From mboxrd@z Thu Jan 1 00:00:00 1970 From: rich turner Date: Thu, 18 Aug 2005 19:53:34 +0000 Subject: general hotplug/udev questions Message-Id: <1124394814.4483.46.camel@rich> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org i am looking at the way suse 9.3 is using hotplug and udev to load network device modules, and want to know if this is specific to suse or if hotplug/udev is using this method and will be used by other distributions going forward. keep in mind that i am not using the initrd (which is initramfs) that suse distributes, or their mkinitrd to create it. i have a process that creates an initrd (old-school, not initramfs), which works on any distribution (2.4 and 2.6 kernels). my problem is that my network modules are not being loaded when the system boots. on all previous distibutions it was a matter of adding the network devices as an alias in /etc/modprobe.conf and then the network startup scripts would handle loading the module when the device was brought up: alias eth0 sis900 what i am seeing on suse 9.3 is that in their initrd (initramfs) they are using klibc and are echoing /sbin/hotplug.sh to /proc/sys/kernel/hotplug. this is the contents of /sbin/hotplug.sh: #!/bin/sh # # /sbin/hotplug.sh # $Id: hotplug.sh,v 1.1 2005/01/20 10:38:11 hare Exp $ # # Simple hotplug script for initramfs # Records all events if requested and starts up udev # # Records all events if requested if [ -d /events -a -x /sbin/hotplugeventrecorder ] ; then /sbin/hotplugeventrecorder $1 2>/dev/null fi AGENT=/sbin/udev if [ -x $AGENT ]; then exec $AGENT $@ echo "couldn't exec $AGENT" fi exit 1 they will then copy all entries that are created in /events to /lib/klibc/events and mount it up using tmpfs so they can access them when exiting the initrd. then within their boot.coldplug init script, they take those events and load the modules. because my linuxrc does not create events or mount /lib/klibc/events in the initrd, then boot.coldplug does not load the network modules. i realize i can load the network modules in the initrd and everything would be golden, but that is not the purpose of the initrd. in my opinion we already do to much in the initrd because the distributions dont do enough (or do it correctly) in their init scripts. we try to keep the initrd's purpose to do only enough to mount the root filesystem. it is important that our process remain generic across all distributions because we need to support many other distributions. does anyone have an opinion as to whether suse's current method will become the standard? it appears that udevstart.static creates events but /sbin/udevstart does not. why is that? is /sbin/hotplugevenrecorder an executable being distributed by suse or is it something that will be coming in the maintained udev? even though we use udevstart in the initrd, is there any real purpose to echoing something (/sbin/udev, /sbin/udevsend, /bin/true) out to /proc/sys/kernel/hotplug while in the initrd? it is my experience that udev only handles devices that you would expect to find in /dev. how could it have any effect on network interfaces? is this a product of hotplug or udev? i apologize for the long message, but i do appreciate any feedback. rich turner ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel