Linux Step By Steps
DEVFS

Devfs is the new device filenaming convention introduced late in the kernel 2.3.x series, but under development since 1998. It will replace /dev as we know it.

The reason why it will undoubtedly replace the 'old' system is because /dev has run out of steam..

In short

There are other, compelling reasons why devfs is a good thing (tm), all of them technical and none of which will help you get it loaded, so let's move on.

Getting devfs working is not *too* difficult if you follow the SxS, BUT, while you are undoubtedly impatient to get devfs up and running, the following is mandatory reading.

What you need to be aware of is:

1) Devfs uses a different naming convention. hda1 is replace by /disk/ide/part1 eg.

2) The devfs file system is mounted (superimposed) over the old /dev directory, thus making those old names innacessible.

3) Each time you boot, a pristine copy of what devfs wants is loaded, you must superimose your own, personal, device system each boot.

3) You must create a series of aliases (symlinks) for many of your current device names in order for them to work under devfs.

It is the latter, that will cause you grief. An explanation is required.

The new kernels (2.4.x) automatically hook into the devfs file system and MANY, but not all, device drivers have been re-written so that they, the drivers, will work with the new naming conventions. Without the use of mknod, without the use of extensive, and quite useless lists of non-existent devices pty0->199 for instance.

The driver calls the kernel, the kernel calls devfs, and devfs creates a node there and then.

voila.

SOME drivers have not been updated to do this. (scsi and hard disk aren't one of them)

Defvs can know NOTHING about popular items like /dev/mouse and /dev/cdrom.

The above two paragraphs cause the grief. A daemon is required to translate old to new and it's called devfsd. It is NOT supplied with the kernel.
 

You must install it.

Let's GO!

ZERO:

Download devfsd from http://www.atnf.csiro.au/~rgooch/linux/

Extract the tarball, change to the appropriate directory and as su type

make
make install

ONE: compile your kernel

Select devfs (filesystems tab)
Select automount at boot time.

DO NOT BOOT THE NEW KERNEL

Take appropriate steps to ensure that you remain bootable with an old kernel, even the current kernel. You are not in Kindergarten, if you're prepared to try devfs and prepared to compile kernels, you're out of the minor league and into being responsible for your own actions. There is a 90% chance you will NOT be able to boot first time under devfs, be warned, be prepared.

TWO:

Make the following changes to your files

/etc/rc.d/rc.modules

As the first executable statements (two)

/sbin/devfsd /dev
.   ./YourSyms

The first loads the dev to devfs daemon _before_ the system comes up. It overloads the /dev directory, You very much want that to happen.

The second statement is a script called YourSyms. It is a script of symlinks of mouse cdrom and other paraphenalia, that YOU and you alone require. You don't need it right now, don't fuss about it.

/etc/fstab

hash out the reference to devpts

Take further note that any references you have to items like /dev/cdrom eg will not work. This is OK.

/etc/lilo.conf

add to your append line (if you have one) the equivalent of

append = "devfs=mount"

for instance.

append = "debug=2 noapic devfs=mount"

Grub users.

Grub has equivalent syntax.

/etc/devfsd.conf

uncomment the following

REGISTER              vc/.*  MKOLDCOMPAT
UNREGISTER        vc/.*  RMOLDCOMPAT
REGISTER             pty/.*  MKOLDCOMPAT
UNREGISTER        pty/.*  RMOLDCOMPAT
REGISTER             misc  MKOLDCOMPAT
UNREGISTER        misc  RMOLDCOMPAT

add the following

REGISTER                 tts/.*          MKOLDCOMPAT
UNREGISTER                 tts/.*          RMOLDCOMPAT

check you have this entry, otherwise do something about it.

LOOKUP PPP MODLOAD

/etc/X11/XF86Config

change any reference to 'mouse' to it's correct port, eg 'psaux'

/etc/rc.d/YourSyms

ln -s /dev/psaux /dev/mouse
ln -s /dev/ttyS1 /dev/cua/1
ln -s /dev/modem /dev/ttyS1

The above are typical entries. I have a ps/2 mouse, and an external modem on com2 (ttyS1). Add salt and pepper to taste.

YourSyms is not critical. You *might* not be able to use gpm consoles or dial out, or read your cdrom, but you will boot. The intention is for you to play here yourself at your convenience.

Finally!

Reboot

After you've settled down and browsed about a bit in the new /dev directory. Revisit /etc/devfsd.conf and hack out what you don't need.

Further reading

/usr/src/linux/Documentation/Changes
/usr/src/linux/Documentation/filesystems/devfs/README