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

Bug#401916: Bug 401916: analysis and suggested solution



* David Härdeman <david@hardeman.nu> [20070219 22:15]:

>  I've attached a patch against the udev and initramfs-tools source packages 
>  that implement the following changes...please review:

>  1) ROOTDELAY is exported by initramfs-tools and used in udev if set

>  2) Checks in udev for scsi/firewire/usb have been added and will add 10   
>  seconds of sleep if found

>  3) The module scsi_wait_scan will be loaded by udev if scsi is detected,   
>  modprobe should only return from loading that module once all scsi   busses 
>  have been scanned (I found that module yesterday...pretty   nifty band-aid 
>  solution to the problem, does not help with   usb/firewire though).

>  The only problem with the approach is that a large majority of all machines 
>  have usb which means that we'll slow down the boot for all those machines even 
>  though a small minority are affected.

ACK

>  Thanks to Mika for the preliminary testing done so far, it has helped my 
>  understanding of the underlying problem...

You are welcome.

[...]
> +# Check for problematic devices
> +problem=0
> +
> +# USB / FireWire
> +if $(grep -q "usb\|ieee1394" /proc/devices); then
> +	problem=1
> +fi

How about:

if $(ps | grep -q usb-storage); then
   problem=1
fi

This way only boxes with usb-storage are affected by the booting
delay and not all the boxes with for example an usb input device
like an usb mouse.

I just verified my "ps...usb-storage"-code: works as intented and
booting from usb works fine then.

I'm not sure about the firewire testcase, but the

  if $(grep -q "ieee1394" /proc/devices); then...

should be ok. (JFTR: I can test booting via firewire as well once,
just running out of time right now.)

[...]
> +if [ ${slumber} -gt 0 ]; then
> +       log_begin_msg "Waiting for additional devices..."

The log_begin_msg call fails (don't ask me why, had no time for
further debugging and locating this bug costed me some minutes
already) and booting failed due to use of 'set -e' in the script
then. Changing the "log_begin_msg" to "echo" fixed the problem.

regards,
-mika-

Attachment: pgpUcdX5pGNBm.pgp
Description: PGP signature


Reply to: