Nathan Coulson wrote:

On 11/2/05, Alexander E. Patrakov <[EMAIL PROTECTED]> wrote:
Jeremy Huntwork wrote:
Heya,

These instructions appear at least in the x86_64 Multilib CLFS book. (I
didn't check the others):

"Also, ensure that the kernel does not attempt to pass hotplugging
events to userspace until userspace specifies that it is ready:

cp kernel/kmod.c{,.bak}
sed 's@/sbin/hotplug@/bin/true@' kernel/kmod.c.bak > kernel/kmod.c"

However, it looks like this has been removed from development LFS. From
my understanding this is no longer needed.

Comments anyone?
It was never needed if the root fs was mounted read-only in grub kernel
line.

With old LFS-bootscripts, mounting the root-fs read-write in grub kernel
line would result in
http://bugs.linuxfromscratch.org/show_bug.cgi?id=842 which at that time
rendered the system unbootable. Now that check is gone, so the system is
bootable, but such "premature" hotplug events would create junk devices
before tmpfs is mounted on /dev.

Note that the hotplug event for /dev/vcs0 is almost guaranteed to reach
/sbin/hotplug before /dev is mounted, because it is generated when
/sbin/init opens /dev/console for the "rc" script.

--
Alexander E. Patrakov
--

What change did that anyway?  AFAIK, nothing in the bootscripts
disables hotplugging until we get to the UDEV bootscript.   [I also
remember everything from the earlier conversations leading up to this,
but I never got my answer back then]
I don't understand the question. Sorry if I answer something else.

Indeed, nothing in the bootscripts disables hotplugging until we get to the udev bootscript. This means that such premature hotplug events do reach udev and create junk device nodes not on tmpfs if there is "rw" in the kernel line in menu.lst. Udev also creates its database not on tmpfs under the same conditions. But now, without the check for udev database in the udev initscript, creation of such junk is harmless (i.e.: the bug is still there, but we ignore its consequences). Before we removed the check, this would result in /dev not being mounted as tmpfs.

Anyway, after Linux-2.6.15 (or even earlier if we apply some patches) we will remove the "hotplug" package and /sbin/hotplug (and therefore the problem) won't exist then.

--
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