Mailing List Archive

USB Boot Problem
G'day,

I've got a USB boot problem.

My target hardware is a PC/104 card with a Vortex86sx processor and a
128MB DOM (disk-on-module) for mass storage.

Currently the test version of the card has a 1GB DOM which is
partitioned as follows:

Device Boot Start End Blocks Id System
/dev/hda1 * 1 141 142096+ 6 FAT16
/dev/hda2 142 991 856800 83 Linux

The BIOS boots to the FAT16 partition where ldlinux.sys takes over and
starts linux and all is fine.

When I insert my USB flash drive, it is recognized as:

usb 1-1.2: new high speed USB device using ehci_hcd and address 3
usb 1-1.2: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning

scsi 0:0:0:0: Direct-Access SanDisk Cruzer Micro 0.1 PQ: 0
ANSI: 2
sd 0:0:0:0: [sda] 2001888 512-byte hardware sectors: (1.02 GB/977
MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sd 0:0:0:0: [sda] 2001888 512-byte hardware sectors: (1.02 GB/977
MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
sd 0:0:0:0: [sda] Assuming drive cache: write through
sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
usb-storage: device scan complete

I need to create a rescue/install USB flash drive.

At present my test flash drive has ldlinux.sys and the same kernel used
by the device. Booting with "linux root=/dev/hda2" works fine. However
for rescue purposes I need "linux root=/dev/sda" (or equivalent).

When I boot with "linux root=/dev/sda1", I get the following

VFS: Cannot open root device "sda1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available
partitions:
0300 1000944 hda driver: ide-gd
0301 142096 hda1
0302 856800 hda2
Kernel panic - not syncing: VFS: Unable to mount root fs on
unknown-block(0,0)

Evidently /dev/sda1 hasn't yet mounted. The boot process runs into the
same problem when I use /dev/sda or /dev/sda2 for "root=".

In the past I've seen similar kernel panics when the kernel lacks the
proper disk driver. Since the system boots fine from the DOM, I believe
my kernel has all the device drivers built in (except scsi_wait_scan.ko
which is a module).

How do I fix the boot problem? Anybody familiar with this problem and
have a recommendation or, even better, a solution?

Regards,

David
Re: USB Boot Problem [ In reply to ]
>    VFS: Cannot open root device "sda1" or unknown-block(0,0)
>    Please append a correct "root=" boot option; here are the available
> partitions:
>    0300      1000944 hda driver: ide-gd
>      0301      142096 hda1
>      0302      856800 hda2
>    Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(0,0)

Try adding "rootdelay=10" (or more) to the kernel commandline.

Manuel
Re: USB Boot Problem [ In reply to ]
On Wed, Feb 10, 2010 at 10:57 AM, Relson, David
<david.relson@orion-sys.com> wrote:
>
> G'day,
>
> I've got a USB boot problem.
>
> My target hardware is a PC/104 card with a Vortex86sx processor and a
> 128MB DOM (disk-on-module) for mass storage.
>
> Currently the test version of the card has a 1GB DOM which is
> partitioned as follows:
>
>       Device Boot      Start         End      Blocks  Id System
>    /dev/hda1   *           1         141      142096+  6 FAT16
>    /dev/hda2             142         991      856800  83 Linux
>
> The BIOS boots to the FAT16 partition where ldlinux.sys takes over and
> starts linux and all is fine.
>
> When I insert my USB flash drive, it is recognized as:
>
>    usb 1-1.2: new high speed USB device using ehci_hcd and address 3
>    usb 1-1.2: configuration #1 chosen from 1 choice
>    scsi0 : SCSI emulation for USB Mass Storage devices
>    usb-storage: device found at 3
>    usb-storage: waiting for device to settle before scanning
>
>    scsi 0:0:0:0: Direct-Access   SanDisk  Cruzer Micro  0.1  PQ: 0
> ANSI: 2
>    sd 0:0:0:0: [sda] 2001888 512-byte hardware sectors: (1.02 GB/977
> MiB)
>    sd 0:0:0:0: [sda] Write Protect is off
>    sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
>    sd 0:0:0:0: [sda] Assuming drive cache: write through
>    sd 0:0:0:0: [sda] 2001888 512-byte hardware sectors: (1.02 GB/977
> MiB)
>    sd 0:0:0:0: [sda] Write Protect is off
>    sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
>    sd 0:0:0:0: [sda] Assuming drive cache: write through
>     sda: sda1
>    sd 0:0:0:0: [sda] Attached SCSI removable disk
>    usb-storage: device scan complete
>
> I need to create a rescue/install USB flash drive.
>
> At present my test flash drive has ldlinux.sys and the same kernel used
> by the device.  Booting with "linux root=/dev/hda2" works fine.  However
> for rescue purposes I need "linux root=/dev/sda" (or equivalent).
>
> When I boot with "linux root=/dev/sda1", I get the following
>
>    VFS: Cannot open root device "sda1" or unknown-block(0,0)
>    Please append a correct "root=" boot option; here are the available
> partitions:
>    0300      1000944 hda driver: ide-gd
>      0301      142096 hda1
>      0302      856800 hda2
>    Kernel panic - not syncing: VFS: Unable to mount root fs on
> unknown-block(0,0)
>
> Evidently /dev/sda1 hasn't yet mounted.  The boot process runs into the
> same problem when I use /dev/sda or /dev/sda2 for "root=".
>
> In the past I've seen similar kernel panics when the kernel lacks the
> proper disk driver.  Since the system boots fine from the DOM, I believe
> my kernel has all the device drivers built in (except scsi_wait_scan.ko
> which is a module).
>
> How do I fix the boot problem?  Anybody familiar with this problem and
> have a recommendation or, even better, a solution?

It's likely that the kernel hasn't fully recognized your USB device
yet (notice the "usb-storage: waiting for device to settle before
scanning" dmesg line?)

Try appending the "rootwait" kernel parameter (kernel waits forever
for the root device to show up), or the "rootdelay=" parameter
(argument is number of seconds to wait). Further information about
these and other related kernel params are in the kernel source tree
under Documentation/kernel-parameters.txt


HTH-

James


>
> Regards,
>
> David
>
>
>
Re: USB Boot Problem [ In reply to ]
>>>>> "David" == Relson, David <david.relson@orion-sys.com> writes:

David> When I boot with "linux root=/dev/sda1", I get the following

David> VFS: Cannot open root device "sda1" or unknown-block(0,0)
David> Please append a correct "root=" boot option; here are the available
David> partitions:
David> 0300 1000944 hda driver: ide-gd
David> 0301 142096 hda1
David> 0302 856800 hda2
David> Kernel panic - not syncing: VFS: Unable to mount root fs on
David> unknown-block(0,0)

David> Evidently /dev/sda1 hasn't yet mounted. The boot process runs into the
David> same problem when I use /dev/sda or /dev/sda2 for "root=".

David> In the past I've seen similar kernel panics when the kernel lacks the
David> proper disk driver. Since the system boots fine from the DOM, I believe
David> my kernel has all the device drivers built in (except scsi_wait_scan.ko
David> which is a module).

David> How do I fix the boot problem? Anybody familiar with this problem and
David> have a recommendation or, even better, a solution?

You might want to pass "rootdelay=5" (seconds), or "rootwait" for
newer kernels (don't know when the latter was introduced).

Joerg