Re: HOWTO use udev to manage /dev

From: Frédéric L. W. Meunier
Date: Thu Feb 19 2004 - 18:48:32 EST


On Thu, 19 Feb 2004, Greg KH wrote:

> On Thu, Feb 19, 2004 at 07:22:30PM -0300, Frédéric L. W. Meunier wrote:
> > On Thu, 19 Feb 2004, Greg KH wrote:
> >
> > > - modify the rc.sysinit script to call the start_udev script as one of
> > > the first things that it does, but after /proc and /sys are mounted.
> > > I did this with the latest Fedora startup scripts with the patch at
> > > the end of this file.
> > >
> > > - make sure the /etc/udev/udev.conf file lists the udev_root as /dev.
> > > It should contain the following line in order to work properly.
> > > udev_root="/dev/"
> > >
> > > - reboot into a 2.6 kernel and watch udev create all of the initial
> > > device nodes in /dev
> > >
> > >
> > > If anyone has any problems with this, please let me, and the
> > > linux-hotplug-devel@xxxxxxxxxxxxxxxxxxxxx mailing list know.
> >
> > Unless I'm missing something, it doesn't seem to work if you
> > don't have /dev/null before it gets mounted.
>
> Did you build udev using glibc or klibc? I used klibc and it worked
> just fine, as udev and udevd does not need /dev/null to work, unlike
> programs built against glibc.

I used your instructions, so klibc.

# ldd /sbin/udev*

/sbin/udev:
not a dynamic executable
/sbin/udevd:
not a dynamic executable
/sbin/udevinfo:
not a dynamic executable
/sbin/udevsend:
not a dynamic executable
/sbin/udevtest:
not a dynamic executable

It doesn't complain if I mount in /udev after I boot with
devfs, probably because it can find /dev/null etc. But I want
to boot with devfs=nomount and use it in /dev.

I changed /etc/rc.d/rc.S to:

[ -e /dev/.devfsd -a -x /sbin/devfsd ] && devfsd /dev

mount -vn -t proc proc /proc # Needed for LABEL= in /etc/fstab

mount -vn -t sysfs sysfs /sys

[ ! -e /dev/.devfsd -a -d /sys/block ] && /etc/rc.d/start_udev

but it shouldn't make any difference. It's just to not use both
at the same time or try to run the script in 2.4.

--
http://www.pervalidus.net/contact.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/