Change kernel source to prevent hotplug?

Jeremy Utley jeremy at
Sat Sep 11 03:42:54 PDT 2004

Laurens Blankers wrote:

> In section 8.3 (of LFS 6.0-testing-20040909) the following sed command 
> is given to change the kernel source:
> sed -i 's@/sbin/hotplug@/bin/true@' kernel/kmod.c
> The comment says that this is nessesary as to prevent the kernel from 
> sending hotplug events when the system is not yet ready for them. But 
> it appears, to me, that this line disables hotplug all together.
> Could someone be more specific on what this line does? Why is sending 
> events to user-space a problem? And this solution requires someone to 
> remember to change the kernel source when it is updated, wouldn't it 
> be a better solution to symlink /sbin/hotplug to /bin/true?
> Laurens

No, this overwrites the default hotplug handler in the kernel - then 
when userspace is ready, we set the hotplug handler to be udev by 
writing it into /proc.  The reason for this is that the kernel can 
sometimes generate hotplug events before userspace is ready for them 
(i.e. before the ramfs is mounted to /dev), and this can interfere when 
we actually try to start udev.


More information about the lfs-dev mailing list