Re: Need to know when usb drive probing finished

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 23 Feb 2012, Barry Kauler wrote:

> On 2/23/12, Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > You can't rely on that message for anything really "being done", so
> > while it seems to work for you, it might fail if a new device is
> > suddenly discovered by the USB hardware just after it was printed out.
> >
> > Like was mentioned, please use udev for your boot procedure, it solves
> > this problem for you.
> >
> 
> Puppy uses a very small initramfs that does not use udev. We use udev
> after a switch_root to the main Puppy filesystem.
> 
> The initramfs 'init' script is supposed to find all drives and we have
> been able to do it reliably without udev, including reliably finding
> all USB drives by our method.
> 
> Sometime back I did look into using udev in the initramfs, but it
> didn't seem to provide all the information that I need. Anyway, I will
> follow your recommendation and take another look at it.

You haven't said what you need.

For example, suppose you're running an older kernel, and your init
script finds a bunch of USB devices and then exits.  At that moment you
plug in a USB flash drive.  Clearly the script will not have been able
to find it.  How do you deal with that?

There's still more to this.  The "scan complete" message you mentioned
earlier gets printed when the SCSI layer has been told to scan the
device.  But the SCSI layer can perform its scanning asynchronously,
and in particular, SCSI disks are always registered asynchronously.  
Therefore the "scan complete" message doesn't mean that the attached
device has been fully scanned.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux