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

Bug#401916:



* David Härdeman <david@hardeman.nu> [20070201 18:08]:
>  On Thu, Feb 01, 2007 at 05:16:11PM +0100, maximilian attems wrote:
> > On Thu, Feb 01, 2007 at 04:38:03PM +0100, David Härdeman wrote:

> >> So, as a workaround for Etch until this is fixed (presumably by upstream
> >> changes to udev and/or the kernel), how about changing the following lines
> >> in the udev initramfs script:
> >>   udevtrigger
> >>   udevsettle || true
> >> to something like this:
> >>   udevtrigger
> >>   udevsettle || true
> >>   while ps | grep -q "[usb-stor-scan]"; do
> >>       sleep 1;
> >>   done
> >>   while ps | grep -q "[scsi_scan_.*]"; do
> >>       sleep 1;
> >>   done
> >>   udevsettle || true

> > mika, you could reliable trigger that race by using
> > grml2hd with lilo.
> > could you please test aboves proposed solution
> > and tell us how it works out?

>  And if you do, please make sure to change the greps to use "\[...\]" instead 
>  of "[...]"

>  The file to edit is:
>  /usr/share/initramfs-tools/scripts/init-premount/udev

Ok, after running several different tests: nope, this does not fix
the problem. The usb stuff is running very asynchron. :(

I did lots of tests, the only version which lets me boot is
something like the following code inside scripts/init-premount/udev:

,---- [ snippet of scripts/init-premount/udev ]
| if grep usb_storage /proc/modules ; then
|    sleep 2
| fi
|
| udevsettle || true
|
| if grep -e ehci_hcd -e uhci_hcd /proc/modules ; then
|    sleep 4
| fi
`----

This works for usb at least. But I'm not really happy with the
solution either, because it does not take care of other subsystems
like firewire, scsi,...

I tried to find out what other distributions do and I like the
approaches of for example OLPC and SuSE. They use an udev rule for
creating the /dev/root device as an symlink to the main device,
like:

  SUBSYSTEM=="block", SYSFS{dev}=="$major:$minor", SYMLINK+="root"

I tried to adopt the code for Debian's initramfs-tools but udev does
not work as I expect it to (I do not find any devices inside /dev
created by udev - huh?!) so I could not resolve the issue so far. :(

More details about above implementation can be found in the mkinitrd
code of SuSE and /init of OLPC, I've uploaded it for you:

  http://grml.org/tmp/mkinitrd.suse
  http://grml.org/tmp/init.olpc

Some questions so I can go on in debugging:

Who is responsible for creating /dev/root right now in
initramfs-tools if parse_numeric code isn't used (the code is
executed only when lilo is used and then /dev/root is created
manually by mknod)?

Are udev rules in /etc/udev/udev.rules or
/etc/udev/rules.d/010-foobar.rules supposed to work? How do I add my
own rules (like the SYMLINK+="root" code) so they are used?  When
booting fails and I'm dropped to busybox, /dev is a tmpfs but nearly
empty (only the code stuff like /dev/null and /dev/tty* is present,
so no udev generated devices around). Is this by intention or not?
What might be wrong here?

Any further tips, hints,... what I could try?

regards,
-mika-
-- 
 ,'"`.         http://www.michael-prokop.at/
(  grml.org -» Linux Live-CD for texttool-users and sysadmins
 `._,'         http://www.grml.org/

Attachment: pgp09crUiWftS.pgp
Description: PGP signature


Reply to: