Skip to contentSkip to conversation

hotplug in initrd/initramfs?

DISCUSSION Andreas Jellinghaus 2 participants 2 messages Dec 15, 2004

lore
Share & tools
lore
#0 lore raw

Hi,

as far as I can tell, the kernel doesn't call
/sbin/hotplug while in initrd/initramfs.

root@earth:/initrd# ls -l sbin/hotplug 
-rwxr-xr-x  1 root root 126 Dec 15 14:42 sbin/hotplug*
root@earth:/initrd# cat sbin/hotplug 
#!/bin/sh

( echo -- hp $$ begin (initrd) --
echo $0: $*
export
echo -- hp $$ end (initrd) -- ) > /dev/console

exit 1
root@earth:/initrd#

works fine in the real /root so I can see every event happening. but during initrd/initramfs nothing happends. this is fatal to me, as I need hotplug for usb devices during that stage.

Anything I can do about it? or if it should work / I have a bug: any idea how to see what is going wrong?

thanks for your help.

Regards, Andreas

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

#1 lore raw
Quoted 2 lines · Andreas Jellinghaus

as far as I can tell, the kernel doesn't call
/sbin/hotplug while in initrd/initramfs.

Note that this is just guesswork and I haven't tried any of it:

There was a code change in April 2004 which might have something to do with this. Check the call_usermodehelper function near the end of kernel/kmod.c and see if it has this (the new code):

if (!khelper_wq)
return -EBUSY

If the code instead mentions "system_running", I think you'll need a newer kernel. The new khelper stuff probably showed up around 2.6.6.

-Dave Dodge

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel