Cannot boot LFS from a USB disk

Rainer Peter Feller rainer at maren.desy.de
Fri Jan 9 08:09:03 PST 2004


On Fri, 9 Jan 2004, John Green wrote:

> Hi,
>
> I have built my LFS, but it won't boot.  The setup is odd,
> in that I have built LFS on a USB disk attached to my
> laptop.  The laptop's own disk is nearly full, and I don't
> want to replace its existing Linux installation until I have
> (B)LFS working fully.  The laptop's BIOS does not support
> booting entirely from USB.  I decided to use the host
> system's /boot directory and the host's lilo to boot the LFS
> system from the USB.
>
> Is it possible to do this?  If so, must I learn grub and
> risk installing grub over my host setup?
>
> The host kernel was built from source, so I am confident
> that the LFS kernel also supports USB disks.  The problem
> comes when the LFS kernel tries to mount its root disk (on
> USB).  I get messages like this:
>
>     VFS: Cannot open root device "805" or 08:05
>     Please append a correct "root=" boot option.
>     Kernel panic: VFS: Unable to mount root fs on 08:05
>
> The "08:05" numbering system comes from a struct in
> do_mounts.c in the kernel, but it is not clear how to
> specify the correct value in lilo.conf.  Some trials gave
> these results:
>
>     lilo.conf          VFS fails to open...
>     ---------------------------------------
>     root=/dev/sda5     08:05
>     root=/dev/hdb5     03:45
>     root=/dev/hda13    03:0d
>
>  From the point of view of the host system, LFS is
> installed on /dev/sda5.
>
> Here are relevant parts of my lilo.conf file.  I really
> don't want to have convert all this (and more) to grub.
>
>     boot=/dev/hda
>     map=/boot/map
>     install=/boot/boot.b
>     vga=extended
>     default=Linux-2.4.23a
>     keytable=/boot/uk.klt
>     lba32
>     prompt
>     nowarn
>     timeout=100
>     message=/boot/message
>     menu-scheme=wb:bw:wb:bw
>     image=/boot/bzImage23a
>         label=Linux-2.4.23a
>         root=/dev/hda8
>         initrd=/boot/initrd.img
>         append="devfs=nomount"
>         read-only
>     image=/boot/bzImageLFS24
>         label=LFS24
>         root=/dev/sda5
>         initrd=/boot/initrd.img
>         append="devfs=nomount"
>         read-only
>     image=/boot/vmlinuz
>         label=failsafe
>         root=/dev/hda8
>         initrd=/boot/initrd.img
>         append="failsafe devfs=nomount"
>         read-only
>     other=/dev/hda1
>         label=windows
>         table=/dev/hda
>     other=/dev/fd0
>         label=floppy
>         unsafe
>
> Image bzImage23a is the host kernel.  Image bzImageLFS24 is
> my lfskernel.
>
> For what it's worth, here is the device map from
> grub in LFS, running chrooted.
>
>     (fd0)       /dev/fd0
>     (hd0)       /dev/hda
>     (hd1)       /dev/sda
>
> The full set of messages leading up to the kernel panic is
> something like the following (only approximate, because I
> had to write them down and type them in):
>
>     host/usb-uhci.c: High bandwidth mode enabled
>     PCI: Found IRQ 11 for device 00:07.2
>     PCI: Sharing IRQ 11 with 00:03.0
>     PCI: Sharing IRQ 11 with 00:03.1
>     host/usb-uhci.c: USB UHCI at I/O 0xdce0, IRQ 11
>     usb.c: new USB bus registered, assigned bus number 1
>     hub.c: USB hub found
>     hub.c: 2 ports detected
>     host/usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
>     Initializing USB Mass Storage driver...
>     usb.c: registered new driver usb-storage
>     USB Mass Storage support registered.
>     NET4: Linux TCP/IP 1.0 for NET4.0
>     IP Protocols: ICMP, UDP, TCP
>     IP: routing cache hash table of 2048 buckets, 16Kbytes
>     TCP: Hash tables configured (established 32768 bind 65536)
>     NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
>     hub.c: new USBdevice 00.07.2-1, assigned address 2
>     host/usb - uhci.c: interrupt status 2, frame# 583
>     VFS: Cannot open root device "805" or 08:05
>     Please append a correct "root=" boot option.
>     Kernel panic: VFS: Unable to mount root fs on 08:05
>
> Yours,
>
> John Green, LFS user 11857

if you have usb, usbstorage, scsi and scsi-disc support in your kernel,
also the rightfs ... the only possibility might be that the usb is not
ready, when the kernel tries to mount root ...

  H
CUH Rainer Peter Feller
  H



More information about the lfs-support mailing list