Skip to contentSkip to conversation

getting usb mass storage to finish before running init?

DISCUSSION Nick Bartos 1 participant 1 message Feb 13, 2004

lore
Share & tools
lore
#0 lore raw

Is there any way to get the kernel to finish initializing usb mass storage devices before running init?

I have a problem where I am trying to boot off usb, but the storage device is not detected when I am trying to do fsck and mount the flash device from my init scripts.

I can put a sleep in there but that is sloppy, and can not really be relied apon (since technically there is no way I can know how long the detection phase will take), and also I may be waisting time (which I don't want to, I want a fast booting router).

I cannot poll to wait for the device to exist in /proc/partitions or in /dev, since some routers will boot off ide and may not even have usb devices.

I would like to hack the kernel to wait to run init until after the usb stuff is done (although I don't really know where to start, I don't know where the usb or init stuff is ran from), or find some clean & reliable way of detecting when it is done (even if it doesn't need to load usb).

I was sort of hoping there was some little-known kernel option that may help me...

Ideas?