From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Alexander E. Patrakov" Date: Thu, 04 Mar 2004 03:56:52 +0000 Subject: Re: initrd and udev Message-Id: <200403040855.32565.patrakov@ums.usu.ru> List-Id: References: <039b01c40151$aefea800$d100a8c0@W2RZ8L4S02> In-Reply-To: <039b01c40151$aefea800$d100a8c0@W2RZ8L4S02> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Wednesday 03 March 2004 23:59, Jim Gifford wrote: > Greg and other udev users, > > I am the maintainer of the LFS mkinitrd script. I'm currently working > on a method to incorporate udev into the script. If you would like to view > my script you can at the following link. > http://cvs.jg555.com/viewcvs.cgi/scripts/system/mkinitrd > > What I want to do is the following > > Start a minimum udev from the initrd with /dev on a ramdisk (mount ramfs > /dev/ram0 /dev) > > Then after the initrd is finished using the init.d script to restart udev. > > Any comments or suggestions > Well, I already use udev with initrd. My initrd contains the following /sbin/init: #!/bin/sh /bin/mount -n -t ext3 -o ro /dev/hda3 /mnt /bin/mount -n -t tmpfs tmpfs /mnt/dev /bin/mount -n -t proc proc /mnt/proc /bin/mount -n -t sysfs sysfs /mnt/sys /bin/mknod -m 0666 /mnt/dev/null c 1 3 cd /mnt /sbin/chroot . /etc/rc.d/init.d/udev start /sbin/pivot_root . mnt exec mnt/sbin/chroot . bin/sh -c 'umount -n /mnt /sbin/blockdev --flushbufs /dev/ram0 umount -n /sys umount -n /proc exec /sbin/init '"$*" dev/console 2>&1 /dev/hda3 is a static node on initrd. On the "main" filesystem, /dev is empty. Of course I changed the included /etc/rc.d/init.d/udev.init.lfs script (renamed it to udev) to manually create the following: mkdir /dev/shm && mkdir /dev/pts && ln -s ../proc/self/fd /dev && ln -s fd/0 /dev/stdin && ln -s fd/1 /dev/stdout && ln -s fd/2 /dev/stderr && ln -s ../proc/kcore /dev/core && ln -s ../proc/asound/oss/sndstat /dev/sndstat && mknod -m 600 /dev/ppp c 108 0 There are no symlinks pointing to the udev initscript. It is called only from initrd. Of course this is insufficient: recently I thought about creating /dev/vcs*, and I already have another initscript that modprobes loop, ide-cd, snd-pcm-oss and other undetectable modules that I need. Note that there is no udev binary on initrd - I use the one from the main system. -- Alexander E. Patrakov ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click _______________________________________________ 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