detecting no USB device quickly



When I boot a kernel on a system with a USB drive attached, there is some
time delay before that drive is available. That time happens to be after
the /init program in my initramfs image gets started. I don't have any
problem with waiting for the USB drive to become available. What I do have
a problem with is doing that waiting when there is no USB drive at all.
The goal is to make this init program specifically look around at drive
contents for what it needs to do. For example a drive with a specific key
on it (perhaps as simple as which filesystem has the latest date on it)
will become the root file system. The USB drive might be plugged in as a
rescue disk on occaision.

Is there any way to detect, right when /init starts, whether there is some
USB device plugged in that is not yet completely registered (as opposed to
there being a USB controller without anything plugged in). It does not
even have to be known to be a storage device, yet. I just want to make
this /init program skip the delay if there are no USB devices at all at
boot time.

--
|---------------------------------------/----------------------------------|
| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below |
| first name lower case at ipal.net / spamtrap-2007-05-04-1247@xxxxxxxx |
|------------------------------------/-------------------------------------|
.



Relevant Pages

  • Re: Downloading the boot loader to the S3C2410TK board
    ... Make sure you have the good type of boot selected, ... sure the USB device connector is really configure as a USB device. ... > I have tried to use USB to download the boot loader. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Simple question- how to erase everything?
    ... Can you use a USB device to run the ... wipe prog from after you boot to the system? ... to boot to another device. ... but this is a rack machine so how do I do this (it's ...
    (alt.linux)
  • Re: [SLE] connect to cellphone
    ... USB device using ohci_hcd and address 9" when it is connected. ... telling me about how I might access the linux file system on the phone? ... If I boot linux ... site-wide spam filters at catherders.com. ...
    (SuSE)
  • Re: PC104 board boot off compact flash, load initrd, and execute out of ramdisk
    ... I think it can boot off a USB device although we are not using any USB ... stuff and therefore did not purchase the little pigtails that would go ... CF card shows up as /dev/hdc, however with a newer kernel a buddy gave ...
    (comp.os.linux.embedded)