From: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
To: linux-hotplug@vger.kernel.org
Subject: Re: initrd and udev
Date: Thu, 04 Mar 2004 03:56:52 +0000 [thread overview]
Message-ID: <200403040855.32565.patrakov@ums.usu.ru> (raw)
In-Reply-To: <039b01c40151$aefea800$d100a8c0@W2RZ8L4S02>
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 >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_id\x1470&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
prev parent reply other threads:[~2004-03-04 3:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-03 18:59 initrd and udev Jim Gifford
2004-03-03 22:04 ` Jim Gifford
2004-03-04 3:56 ` Alexander E. Patrakov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200403040855.32565.patrakov@ums.usu.ru \
--to=patrakov@ums.usu.ru \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox