Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread spiky
On Sun, 2011-11-13 at 01:26 +, Andrew Benton wrote:
 On Sat, 12 Nov 2011 22:53:11 +
 spiky martynvid...@aol.com wrote:
 
  I have built lfs7 with linux 3.1rc4. I cant boot it when on sdc. If 
  drive is put in laptop on IDE it will boot. I have set the fstab  
  grub.cfg in lots of different ways still no joy,
  grub.cfg
  
  # Begin /boot/grub/grub.cfg
  set default=0
  set timeout=5
  
  insmod ext2
  set root=(hd2,1)
  
  menuentry GNU/Linux, Linux 3.1-lfs-7.0 {
   linux   /boot/vmlinuz-3.1-lfs-7.0 root=/dev/sdc1
  }
  
  fstab
  # Begin /etc/fstab
  
  # file system  mount-point  type   options dump  fsck
  #order
  
  /dev/sdc1  /ext4   defaults1 1
  /dev/sdc2  swap swap   pri=1   0 0
  proc   /procproc   defaults0 0
  sysfs  /sys sysfs  defaults0 0
  devpts /dev/pts devpts gid=4,mode=620  0 0
  tmpfs  /run tmpfs  defaults0 0
  # End /etc/fstab
  
  I would like it to boot off it,s own drive selected by bios (bios dose 
  allow booting from usb)
 
 At what point in the boot process does the boot fail (BIOS, grub or
 kernel)? What sort of error messages do you get when the boot fails?
 Give us a clue, what actually happens?
 FWIW fstab is irrelevent for a boot failing. The kernel gets its root
 partition from the grub command line in grub.cfg and mounts that read
 only. /etc/fstab comes into play later when the bootscripts do their
 work.
 
 Andy
Ok I used grub prompt it showed the usb drive
hd0,msdos1(LFS-7.0),2(swap),3(home).
then entered set root=(hd0,msdos)
linux /boot/vmlinux-3.1-7.0 (it found with tab)root=/devsda1
boot
i get 
no filesystem could mount root tried ext 3 ,2, 4 etc
also Kernel panic not syncing VFS unable to mount root fson unknown
block (8.1).
This is the same as I get when I let it boot as normal for this drive.
 
  Martyn


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread Andrew Benton
On Sun, 13 Nov 2011 10:36:34 +
spiky martynvid...@aol.com wrote:

 Ok I used grub prompt it showed the usb drive
 hd0,msdos1(LFS-7.0),2(swap),3(home).
 then entered set root=(hd0,msdos)
 linux /boot/vmlinux-3.1-7.0 (it found with tab)root=/devsda1
 boot
 i get 
 no filesystem could mount root tried ext 3 ,2, 4 etc
 also Kernel panic not syncing VFS unable to mount root fs on unknown
 block (8.1).
 This is the same as I get when I let it boot as normal for this drive.
  

That looks like a kernel panic, which is good because it means you've
got past the BIOS and grub. It could be that you've not compiled the
kernel with support for the root filesystem built into the kernel. It
could also be that the kernel config is fine but you've passed it the
wrong root= option on the grub command line. I'm pretty sure I'd get a
similar looking kernel panic if I tried to boot my kernel with root=
pointing to my swap partition. Another possibility is that the kernel
sees the partition as /dev/sdb1 or /dev/hdc1 or some such. There's no
way to be sure other than to try all the combinations you can think of
and see what works. If none of them work then the problem is probably
with your kernel config so you'll have to work on that recompile your
kernel until you get one that boots.

Andy
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread spiky
On 13/11/11 11:50, Andrew Benton wrote:
 On Sun, 13 Nov 2011 10:36:34 +
 spikymartynvid...@aol.com  wrote:

 Ok I used grub prompt it showed the usb drive
 hd0,msdos1(LFS-7.0),2(swap),3(home).
 then entered set root=(hd0,msdos)
 linux /boot/vmlinux-3.1-7.0 (it found with tab)root=/devsda1
 boot
 i get
 no filesystem could mount root tried ext 3 ,2, 4 etc
 also Kernel panic not syncing VFS unable to mount root fs on unknown
 block (8.1).
 This is the same as I get when I let it boot as normal for this drive.

 That looks like a kernel panic, which is good because it means you've
 got past the BIOS and grub. It could be that you've not compiled the
 kernel with support for the root filesystem built into the kernel. It
 could also be that the kernel config is fine but you've passed it the
 wrong root= option on the grub command line. I'm pretty sure I'd get a
 similar looking kernel panic if I tried to boot my kernel with root=
 pointing to my swap partition. Another possibility is that the kernel
 sees the partition as /dev/sdb1 or /dev/hdc1 or some such. There's no
 way to be sure other than to try all the combinations you can think of
 and see what works. If none of them work then the problem is probably
 with your kernel config so you'll have to work on that recompile your
 kernel until you get one that boots.

 Andy
Even tho the system will boot when an ide, I did recompile kernel 
yesterday checking sata stuff and usb. It just seems confusing as I know 
it will boot until connected as usb. I will try kernel again checking 
for root file system support.
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


RE: built LFS7 wont boot from usb harddrive

2011-11-13 Thread Alain Toussaint
 hd0,msdos1(LFS-7.0),2(swap),3(home).
  ^^

Could it be that the partition is FAT32 instead of ext(2,3,4)?

Alain

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread spiky
On 13/11/11 12:36, Alain Toussaint wrote:
 hd0,msdos1(LFS-7.0),2(swap),3(home).
^^

 Could it be that the partition is FAT32 instead of ext(2,3,4)?

 Alain

I formatted the partition with gparted to ext4 swap is swap home ext4

 Martyn
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread spiky
On 13/11/11 12:38, spiky wrote:
 On 13/11/11 12:36, Alain Toussaint wrote:
 hd0,msdos1(LFS-7.0),2(swap),3(home).
 ^^

 Could it be that the partition is FAT32 instead of ext(2,3,4)?

 Alain

 I formatted the partition with gparted to ext4 swap is swap home ext4

   Martyn
Ok I have run kernel config again I enabled all filesystems ext2,3,4 in 
the file section hope this was the right place for root filesystem.
  I ran grub prompt on my ubuntu system (IDE) (set root hd0,2) then 
(root =/dev/sda2) that boots. I tried ubuntu 11.10 which is on sdb (usb) 
Couldn,t get it to boot? from grub prompt but will if select that 
harddrive from bios.
  I redone LFS grub.cfg  root=hdo,2   then linux root=UUID=uuid 
no still no joy
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread Bruce Dubbs
Andrew Benton wrote:
 On Sun, 13 Nov 2011 10:36:34 +
 spiky martynvid...@aol.com wrote:
 
 Ok I used grub prompt it showed the usb drive
 hd0,msdos1(LFS-7.0),2(swap),3(home).
 then entered set root=(hd0,msdos)

That seems right.  The msdos part is the boot record type, not a 
partition type,


 linux /boot/vmlinux-3.1-7.0 (it found with tab)root=/devsda1

Is there a missing / or just a typo?  Should be /dev/sda1

 boot

 i get 
 no filesystem could mount root tried ext 3 ,2, 4 etc
 also Kernel panic not syncing VFS unable to mount root fs on unknown
 block (8.1).

When you have a problem with a lot of new things, isolate the new from 
the old.  I recommend going back to a ext3 partition until you get it 
working.

 This is the same as I get when I let it boot as normal for this drive.

 That looks like a kernel panic, which is good because it means you've
 got past the BIOS and grub. 

Right.

 It
 could also be that the kernel config is fine but you've passed it the
 wrong root= option on the grub command line. 

That would be my thought too.

I'm pretty sure I'd get a
 similar looking kernel panic if I tried to boot my kernel with root=
 pointing to my swap partition. Another possibility is that the kernel
 sees the partition as /dev/sdb1 or /dev/hdc1 or some such. There's no
 way to be sure other than to try all the combinations you can think of
 and see what works. If none of them work then the problem is probably
 with your kernel config so you'll have to work on that recompile your
 kernel until you get one that boots.

BTW, the kernel doesn't understand root=UUID=uuid.  You have to have a 
initrd for that.  I'm not sure if the kernel understands 
root=LABEL=label or not.

Just remember that grub's root and the kernel's root are not, in 
general, the same thing, although they could point to the same place.

   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread spiky
On 13/11/11 17:12, Bruce Dubbs wrote:
 Andrew Benton wrote:
 On Sun, 13 Nov 2011 10:36:34 +
 spikymartynvid...@aol.com  wrote:

 Ok I used grub prompt it showed the usb drive
 hd0,msdos1(LFS-7.0),2(swap),3(home).
 then entered set root=(hd0,msdos)
 That seems right.  The msdos part is the boot record type, not a
 partition type,


 linux /boot/vmlinux-3.1-7.0 (it found with tab)root=/devsda1
 Is there a missing / or just a typo?  Should be /dev/sda1

 boot
 i get
 no filesystem could mount root tried ext 3 ,2, 4 etc
 also Kernel panic not syncing VFS unable to mount root fs on unknown
 block (8.1).
 When you have a problem with a lot of new things, isolate the new from
 the old.  I recommend going back to a ext3 partition until you get it
 working.

 This is the same as I get when I let it boot as normal for this drive.
 That looks like a kernel panic, which is good because it means you've
 got past the BIOS and grub.
 Right.

 It
 could also be that the kernel config is fine but you've passed it the
 wrong root= option on the grub command line.
 That would be my thought too.

 I'm pretty sure I'd get a
 similar looking kernel panic if I tried to boot my kernel with root=
 pointing to my swap partition. Another possibility is that the kernel
 sees the partition as /dev/sdb1 or /dev/hdc1 or some such. There's no
 way to be sure other than to try all the combinations you can think of
 and see what works. If none of them work then the problem is probably
 with your kernel config so you'll have to work on that recompile your
 kernel until you get one that boots.
 BTW, the kernel doesn't understand root=UUID=uuid.  You have to have a
 initrd for that.  I'm not sure if the kernel understands
 root=LABEL=label or not.

 Just remember that grub's root and the kernel's root are not, in
 general, the same thing, although they could point to the same place.

 -- Bruce
If I was to go back to ext3 would that mean a complete rebuild or is it 
possible to use gparted?
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread spiky

On 13/11/11 17:12, Bruce Dubbs wrote:

Andrew Benton wrote:

On Sun, 13 Nov 2011 10:36:34 +
spikymartynvid...@aol.com  wrote:


Ok I used grub prompt it showed the usb drive
hd0,msdos1(LFS-7.0),2(swap),3(home).
then entered set root=(hd0,msdos)

That seems right.  The msdos part is the boot record type, not a
partition type,



linux /boot/vmlinux-3.1-7.0 (it found with tab)root=/devsda1

Is there a missing / or just a typo?  Should be /dev/sda1


boot
i get
no filesystem could mount root tried ext 3 ,2, 4 etc
also Kernel panic not syncing VFS unable to mount root fs on unknown
block (8.1).

When you have a problem with a lot of new things, isolate the new from
the old.  I recommend going back to a ext3 partition until you get it
working.


This is the same as I get when I let it boot as normal for this drive.

That looks like a kernel panic, which is good because it means you've
got past the BIOS and grub.

Right.


It
could also be that the kernel config is fine but you've passed it the
wrong root= option on the grub command line.

That would be my thought too.

I'm pretty sure I'd get a

similar looking kernel panic if I tried to boot my kernel with root=
pointing to my swap partition. Another possibility is that the kernel
sees the partition as /dev/sdb1 or /dev/hdc1 or some such. There's no
way to be sure other than to try all the combinations you can think of
and see what works. If none of them work then the problem is probably
with your kernel config so you'll have to work on that recompile your
kernel until you get one that boots.

BTW, the kernel doesn't understand root=UUID=uuid.  You have to have a
initrd for that.  I'm not sure if the kernel understands
root=LABEL=label or not.

Just remember that grub's root and the kernel's root are not, in
general, the same thing, although they could point to the same place.

-- Bruce

Ok just found a fix fstab
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5


insmod ext2
set root=(hd0,1)

menuentry GNU/Linux, Linux 3.1-lfs-7.0 {
linux   /boot/vmlinuz-3.1-lfs-7.0 root=/dev/sdc1 *rootdelay=30 ro*
}

any thoughts I will play with fstab, The idea is waiting for the usb to 
load (google search)
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread Bruce Dubbs
spiky wrote:

 If I was to go back to ext3 would that mean a complete rebuild or is it 
 possible to use gparted?

Create a new partition

mkfs -t ext3 /dev/sda?
mount /dev/sda? /mnt
mkdir /mnt/{bin,dev,home,lib,mnt,proc,sys,usr}
mkdir /mnt/{boot,etc,media,opt,root,sbin,srv,tmp,var}

for d in bin home lib usr boot etc opt root sbin srv var; do
   cp -ap /$d/* /mnt/$d
done

Do not copy /proc, /sys, /dev, /run, /tmp
---

If you can get another system up, this would be easier:

mkdir /mnt/{old,new}
mount /dev/sda1 /mnt/old
mount /dev/sda? /mnt/new

cp -ap /mnt/old/* /mnt/new



   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page


Re: built LFS7 wont boot from usb harddrive

2011-11-13 Thread Matijn Woudt
On Sun, Nov 13, 2011 at 7:24 PM, Bruce Dubbs bruce.du...@gmail.com wrote:
 spiky wrote:

 If I was to go back to ext3 would that mean a complete rebuild or is it
 possible to use gparted?

 Create a new partition

 mkfs -t ext3 /dev/sda?
 mount /dev/sda? /mnt
 mkdir /mnt/{bin,dev,home,lib,mnt,proc,sys,usr}
 mkdir /mnt/{boot,etc,media,opt,root,sbin,srv,tmp,var}

I wouldn't just create these dirs, my advice would be follow the
instructions in chapter 6.5 of the LFS book[1].

Matijn

[1] http://www.linuxfromscratch.org/lfs/view/stable/chapter06/creatingdirs.html
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page