linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* USB HDD boot panic (2.6.31)
@ 2009-09-25  4:47 Ben Ryan
  2009-09-26  2:51 ` Robert Hancock
  2009-09-27 17:45 ` Calvin Walton
  0 siblings, 2 replies; 3+ messages in thread
From: Ben Ryan @ 2009-09-25  4:47 UTC (permalink / raw)
  To: linux-kernel

I've a question regarding boot from USB-attached IDE HDD under 2.6.31
(slackware/lilo).
Searches haven't shed much light on status or resolutions.
Booting from this device throws:


VFS: Cannot open root device "sda1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available
partitions:
.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown
block(0,)


I notice that there's no /dev/sd(x) devices listed as possible roots in the
error.
I've tried a kernel build with all relevant drivers inbuilt (not modules).
Tested on multiple machines with same result.
This issue seems to have some history, earlier kernels had patches written
for genhd.c (but I lack the skills to port them forward).
Discussion here:
http://lkml.indiana.edu/hypermail/linux/kernel/0405.0/0224.html

>From what I can gather the USB drivers aren't finished initialising before
the disks are enumerated and mapped to /dev.

Is this a known, current issue?
Does anyone have a patch that can help? If so, why isn't it mainlined?
(Please CC responses!)

Thanks
Ben


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: USB HDD boot panic (2.6.31)
  2009-09-25  4:47 USB HDD boot panic (2.6.31) Ben Ryan
@ 2009-09-26  2:51 ` Robert Hancock
  2009-09-27 17:45 ` Calvin Walton
  1 sibling, 0 replies; 3+ messages in thread
From: Robert Hancock @ 2009-09-26  2:51 UTC (permalink / raw)
  To: Ben Ryan; +Cc: linux-kernel

On 09/24/2009 10:47 PM, Ben Ryan wrote:
> I've a question regarding boot from USB-attached IDE HDD under 2.6.31
> (slackware/lilo).
> Searches haven't shed much light on status or resolutions.
> Booting from this device throws:
>
>
> VFS: Cannot open root device "sda1" or unknown-block(0,0)
> Please append a correct "root=" boot option; here are the available
> partitions:
> .
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown
> block(0,)
>
>
> I notice that there's no /dev/sd(x) devices listed as possible roots in the
> error.
> I've tried a kernel build with all relevant drivers inbuilt (not modules).
> Tested on multiple machines with same result.
> This issue seems to have some history, earlier kernels had patches written
> for genhd.c (but I lack the skills to port them forward).
> Discussion here:
> http://lkml.indiana.edu/hypermail/linux/kernel/0405.0/0224.html
>
>  From what I can gather the USB drivers aren't finished initialising before
> the disks are enumerated and mapped to /dev.
>
> Is this a known, current issue?
> Does anyone have a patch that can help? If so, why isn't it mainlined?
> (Please CC responses!)

For this sort of setup you really need some sort of initrd that will 
wait until the devices are detected before trying to mount the root file 
system, rather than trying to have the kernel mount the root file system 
on the USB HD directly. The problem is that the USB device detection is 
asynchronous and the kernel doesn't really know when all possible USB 
devices have "shown up".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: USB HDD boot panic (2.6.31)
  2009-09-25  4:47 USB HDD boot panic (2.6.31) Ben Ryan
  2009-09-26  2:51 ` Robert Hancock
@ 2009-09-27 17:45 ` Calvin Walton
  1 sibling, 0 replies; 3+ messages in thread
From: Calvin Walton @ 2009-09-27 17:45 UTC (permalink / raw)
  To: Ben Ryan; +Cc: linux-kernel

On Fri, 2009-09-25 at 14:47 +1000, Ben Ryan wrote:
> I've a question regarding boot from USB-attached IDE HDD under 2.6.31
> (slackware/lilo).

> From what I can gather the USB drivers aren't finished initialising before
> the disks are enumerated and mapped to /dev.
> 
> Is this a known, current issue?
> Does anyone have a patch that can help? If so, why isn't it mainlined?
> (Please CC responses!)

This is a bit of a known issue, because USB simply doesn't have a way of
letting you know when scanning for devices has been completed. Current
versions of linux have a simple workaround: add "rootwait" to your
kernel command line in LILO.

(from Documentation/kernel-parameters.txt:)
        rootwait        [KNL] Wait (indefinitely) for root device to show up.
                        Useful for devices that are detected asynchronously
                        (e.g. USB and MMC devices).

Alternately, you can use an initramfs which is set up to wait for the
device to appear. The rootwait option is off by default in order to
speed up booting under normal circumstances.

> Thanks
> Ben

-- 
Calvin Walton <calvin.walton@gmail.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-09-27 17:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-25  4:47 USB HDD boot panic (2.6.31) Ben Ryan
2009-09-26  2:51 ` Robert Hancock
2009-09-27 17:45 ` Calvin Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).