Below is the incomplete list of things done wrong or incompletely in the udev_update branch. Here "wrong" doesn't include upstream faults.

1) Udev bootscript doesn't wait for uevents to be fully processed. Upstream recommends the following shell snippet for this purpose:

        loop=300
        while test -d /dev/.udev/queue; do
            sleep 0.1
            test "$loop" -gt 0 || break
            loop=$(($loop - 1))
        done
        test "$loop" -gt 0
        evaluate_retval

This should happen after echoing "add" to sysfs uevent files. Failure to wait for uevents may lead to unbootable system if /usr is on a SCSI disk with a driver being loaded by udev.

Upstream fault: this loop isn't very robust, on my computer some USB-related uevents leak past it (i.e.: happen within 5 seconds after the end of it without my interaction). Upstream has already been notified, they say it is OK because USB devices are not essential for booting. Given that on the not-yet-committed LiveCD this happens even without USB, I tend to disagree. More on this after further investigation.

2) There is no "udev_retry" initscript. The idea is that, if a program specified in the "RUN" rule exits with nonzero status (presumably because it needs /usr), udev places a symlink into /dev/.udev/failed. The udev_retry initscript should run after mountfs and re-trigger the failed uevents in hope that they won't fail again.

3) Linux-2.6.15 is used, which means that some deices (e.g., IDE CD-ROMs and input devices) won't get modaliases or won't generate uevents properly. The solution is to upgrade to linux-2.6.16-rc4 or to say that the bug exists and the workaround is to put the offending driver names (e.g. ide-cd, ide-tape, mousedev) into /etc/sysconfig/modules or to make them non-modules. Note to #lfs-support: this is not an excuse for non-working PCI, SCSI, FireWire or USB hardware detection.

4) [IRC] The "cdrom" rule in udev-config-5.rules used SYMLINK="cdrom" instead of SYMLINK+="cdrom", thus killing all other symlinks to the same device that users may have created. Issue with "more than one CD-ROM" also exists, but has no clear upstream solution (they say: dynamically generate rules for persistent CD-ROM naming, but provide no implementation).

5) There is no (and will never be) ataraid in 2.6 kernels, please remove the rule.

6) The "mouse" symlink points to the random mouse, it should point to /dev/input/mice

7) The "SUBSYSTEM" in the module-loading rule should be omitted at all.

8) Additional rules are needed for loading SCSI cdrom and tape modules. Also, there is no firmware loading rule.

9) The text about modules that cannot be loaded by udev is incomplete. Wrapper modules like snd-pcm-oss and old third-party odules are mentioned. Modules that don't correspond to any hardware (e.g., loop, tun, ppp_generic) aren't.

10) "s/hotplug event/uevent/g" due to official renaming of those things.

11) The deprecated udev_run_hotplugd helper is needed for compatibility with BLFS (look at HAL). I propose to do this:

make EXTRAS="`echo extras/*/`"

instead of explicitly listing extras.

12) Some other method has to be used instead of /sbin/udevstart to make nodes needed for the bot loader. I vote for instructions to look up the devide major and minor numbers manually in sysfs and manually issue the mknod commands.

13) The need for persistent device naming is not explained (Ticket #1672)

My personal wish to Matthew Burgess: please patch your kernel with Suspend2 and try to get it fully working, in order to have a real motivation to build everything as modules. If done properly, this will allow you to hibernate your computer as in Win2K/XP.

--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to