Linux Hotplug development
 help / color / mirror / Atom feed
* initrd and udev
@ 2004-03-03 18:59 Jim Gifford
  2004-03-03 22:04 ` Jim Gifford
  2004-03-04  3:56 ` Alexander E. Patrakov
  0 siblings, 2 replies; 3+ messages in thread
From: Jim Gifford @ 2004-03-03 18:59 UTC (permalink / raw)
  To: linux-hotplug

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

----
Jim Gifford
maillist@jg555.com



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* initrd and udev
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Jim Gifford @ 2004-03-03 22:04 UTC (permalink / raw)
  To: linux-hotplug

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

----
Jim Gifford
maillist@jg555.com



-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: initrd and udev
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander E. Patrakov @ 2004-03-04  3:56 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-03-04  3:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox