Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1651 closed defect (fixed)

Don't kill udevd on the host

Reported by: alexander@… Owned by: lfs-book@…
Priority: highest Milestone: 6.1.1
Component: Book Version: SVN
Severity: blocker Keywords:
Cc: joergen@…

Description

Currently, the book kills all instances of udevd, including the host's one, at least twice:

1) When doing a "make install" for udev. Avoidable by using "make DESTDIR=/ EXTRAS=extras/run_directory install", as the LiveCD does. 2) Exlicitly in "9.3. Rebooting the System", in urder to unmount filesystems.

LiveCD avoids (2) by never issuing "udevstart", but that is not acceptable for the book because udevstart is needed before installing GRUB as the boot loader. No solution suitable for the book is currently known other than (very suboptimal) reverting to static /dev. Ideas are welcome.

Killing the hosts's udevd is bad, because on the current Debian Sid and on other hosts that set /proc/sys/kernel/hotplug to empty string this completely breaks the hosts's ability to process hotplug events.

On hosts that set /proc/sys/kernel/hotplug to either /sbin/hotplug or /sbin/udevsend, the problem is of absolutely no severety, as the next hotplug event will re-execute udevd.

Change History (8)

comment:1 by steve.crosby@…, 18 years ago

pgrep -n will return the pid of the most recently started instance, so something like:

kill pgrep -n udevd should do the job nicely - If the host does use udev, then the only running process will be the latest, and if they do, only the one we started will be killed.

comment:2 by alexander@…, 18 years ago

This needs further investigation due to the fact that udevd can just refuse to start in LFS chroot because the hosts's udevd has the socket busy.

comment:3 by alexander@…, 18 years ago

Results of investigation:

Point (1) is true: passing DESTDIR=/ avoids killing the host's udevd. This also avoids running udevd in the LFS chroot.

Point (2) is not true: running udevstart does not produce the udevd process. So after implementing (1), there is no longer any need to kill udevd before unmounting filesystems. There is simply no udevd in the LFS chroot. But I want someone else to verify this.

comment:4 by alexander@…, 18 years ago

Milestone: 6.1.1

This is important for 6.1.1 also

comment:5 by Matthew Burgess, 18 years ago

Thanks Alexander, I've verified that no udevd process exists in the chroot environment. If you wouldn't mind reviewing r7132:r7134 to make sure I've done the right thing (and it's explained adequately) I'd appreciate it. I'll leave this open until the fix is confirmed to be good.

comment:6 by alexander@…, 18 years ago

Resolution: fixed
Status: newclosed

The explanation of the EXTRAS option is not 100% correct. Debian did remove hotplug, and they don't need the udev_run_*d binaries. They handle hot-pluggable devices correctly by means of udev rules.

So maybe:

This builds the udev_run_devd and udev_run_hotplugd binaries that are used in the LFS udev rules for passing hotplug events to programs installed by Hotplug package.

But that's a different bug, so I mark this one as fixed.

comment:7 by alexander@…, 18 years ago

Cc: joergen@… added

comment:8 by alexander@…, 18 years ago

* Bug 1653 has been marked as a duplicate of this bug. *

Note: See TracTickets for help on using tickets.