LFS Devfs

From VDR Wiki
Revision as of 01:50, 27 November 2004 by Monroe (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


In the /dev directory are the device nodes for the access to all devices (e.g. hard drives, mice, sound cards). There are two different types, character devices (unbuffered I/O) and block devices (buffered I/O). Those device node are normally created with MAKEDEV, without a node, no access to the device is possible.

This is the reason why there could be thousands of files in the /dev directory without corresponding devices connected to the computer.

The DevFS filesystem on the other hand creates those device nodes dynamically, MAKEDEV is not necessary anymore and only needed device files are in the /dev directory. And there is now also a logical directory hierarchy structure.


Kernel with DevFS support

A kernel with support for the DevFS filesystem (CONFIG_DEVFS_FS=y) is required

File systems  --->
  Pseudo filesystems  --->
    [X] /dev file system support

This option is not activated by default.

The options

    [ ]   Automatically mount at boot
    [ ]   Debug devfs

should NOT be activated

The rest of the kernel is configured, compiled and installed as normal.



tar xvfz devfsd-v<VERSION>.tar.gz
cd devfsd-v<VERSION>
make install


After the installation of devfsd, the /etc/devfsd.conf should customised to the system.

The devfsd should be started at system startup and that as early as possible. Der devfsd muss mit dem System gestartet werden, und zwar möglichst früh. Nur so kann auf gebräuchliche

Here is an example for a /etc/rc.d/init.d/devfsd

# begin of /etc/rc.d/init.d/devfsd
# startet den Daemon für das virtuelle /dev Dateisystem
source /etc/sysconfig/rc
source $rc_functions

case "$1" in
 echo  "Starte devfs Daemon "
 /sbin/devfsd /dev
 echo  "Stoppe devfs Daemon "
 echo "$0 Status: not implemented"
 echo "Usage: $0 {start|stop|status}"
 exit 1

test "$return" = "$rc_done" || exit 1
exit 0

Anschließend noch ein Link:

ln -sf  /etc/rc.d/init.d/devfsd /etc/rc.d/rcsysinit.d/S00devfsd


  • Some (very rare) drivers do not support DevFS, they have to be configured through the /etc/devfsd.conf


[1] http://www.atnf.csiro.au/people/rgooch/linux/docs/devfs.html The FAQ for DevFS
[2] http://www.atnf.csiro.au/people/rgooch/linux Richard Goochs Webpage