[ Prev ] [ Table of Contents ] [ Front Page ] [ FAQ ] [ Next ]


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
LinuxCare, http://www.linuxcare.com/


(?) Linux devfs (Device Filesystem)

From Nathan F. on Thu, 08 Jun 2000

Hello! Excuse the beginner question, but I was wondering how in the heck to install and run DEVFS in my RedHat 6.2 linux OS?

(!) Short Answer: get 2.4.0test* and use that!
Before I say anything else I should point out that I haven't been using Red Hat for the last few revisions. So I don't know the details of their 6.2 release.
That said I can answer the general question about devfs.

(?) I never saw the option under menuconfig, and whenever I try to do something like "mount -t devfs none /devfs" it says that the kernel doesn't support it.

(!) [For our readers who may not have heard of it: devfs is a "virtual filesystem" like /proc, but for dynamically representing devices instead of processes. /proc and devfs are sort of like RAM disks, they exist in memory rather than on a physical disk or partition. Each represents ways for the kernel to present its internal state to userspace using a common directory/file hierarchical abstraction. Richard Gooch has been working on devfs for a couple of years, and Linus recently accepted it into the mainstream developmental kernels]

(?)

  1. how do I go about adding it during the kernel compile (or during RedHat Setup)?

(!) I suspect that 6.2 is shipping with a 2.2.15 or so kernel. devfs was not included in mainstream kernels prior to 2.3.46 or so. So, you'd have to either use a development/test kernel (2.4.0test1-ac10 is what I'm using at the moment), or download Richard Gooch's patches for the earlier kernel versions.

[ RedHat shipped with 2.2.14. A 2.2.16 kit is posted in their updates area, including i586 and i686 specific flavors for uniprocessor or smp. You definitely want to find a mirror site to do the download from, though.
-- Heather. ]

You can learn all about Richard's work at his web site:
http://www.atnf.csiro.au/~rgooch/linux/kernel-patches.html

(?)

  1. is there something to add in the makefile?

(!) The patch includes changes to the make files so that the new options will appear in 'make menuconfig' and its ilk.

(?)last but not least,

  1. What is the variable that is used during boot up that determines whether or not to use devfs?

(!) You're probably asking for:
"devfs=nomount"
The patch, and some of the 2.3.46+ series of kernels had this really irritating default. They would mount the filesystem over /dev as the kernel booted, thus over-riding your normal device list. This would make the system essentially unusable if you had not made all of the correct adjustments to all of your rc scripts, /etc/fstab and other files. (There was a warning about this in the configuration help in 'menuconfig' and in other places).
In the latest kernels (2.4.0test1) this is NOT the default. You can enable devfs support when you build a kernel and then play with it at your leisure.
For example I have devfs mounted on /devfs on mars (my laptop). Here's a (partial) list of the devices that I currently have recognized/active thereunder:
/devfs/.devfsd
/devfs/cpu
/devfs/cpu/mtrr
/devfs/misc
/devfs/misc/apm_bios
/devfs/misc/psaux
/devfs/mem
/devfs/kmem
/devfs/null
/devfs/port
/devfs/zero
/devfs/full
/devfs/random
/devfs/urandom
/devfs/tty
/devfs/console
/devfs/vc
/devfs/vc/1
/devfs/vc/2
   ....
/devfs/vc/63
/devfs/vc/0
/devfs/ptmx
/devfs/pty
/devfs/pty/m0
/devfs/pty/m1
  ....
/devfs/pty/m254
/devfs/pty/m255
/devfs/pty/s0
 ....
/devfs/pty/s7
/devfs/pts
/devfs/vcc
/devfs/vcc/0
/devfs/vcc/a
/devfs/vcc/1
/devfs/vcc/a1
 ....
/devfs/vcc/7
/devfs/vcc/a7
/devfs/rd
/devfs/rd/0
 ....
/devfs/rd/15
/devfs/ide
/devfs/ide/host0
/devfs/ide/host0/bus0
/devfs/ide/host0/bus0/target0
/devfs/ide/host0/bus0/target0/lun0
/devfs/ide/host0/bus0/target0/lun0/disc
/devfs/ide/host0/bus0/target0/lun0/part1
/devfs/ide/host0/bus0/target0/lun0/part2
/devfs/ide/host0/bus0/target0/lun0/part4
/devfs/ide/host0/bus0/target0/lun0/part5
/devfs/ide/host0/bus0/target0/lun0/part6
/devfs/ide/host0/bus0/target0/lun0/part7
/devfs/ide/host0/bus0/target0/lun0/part8
/devfs/ide/host0/bus1
/devfs/ide/host0/bus1/target0
/devfs/ide/host0/bus1/target0/lun0
/devfs/ide/host0/bus1/target0/lun0/cd
/devfs/cdroms
/devfs/cdroms/cdrom0
/devfs/discs
/devfs/discs/disc0
/devfs/scsi
/devfs/tts
/devfs/tts/0
/devfs/tts/1
/devfs/cua
/devfs/cua/0
/devfs/cua/1
/devfs/root
/devfs/floppy
/devfs/floppy/0u1440
/devfs/floppy/0u1680
/devfs/floppy/0u1722
/devfs/floppy/0u1743
/devfs/floppy/0u1760
/devfs/floppy/0u1920
/devfs/floppy/0u1840
/devfs/floppy/0u1600
/devfs/floppy/0u360
/devfs/floppy/0u720
/devfs/floppy/0u820
/devfs/floppy/0u830
/devfs/floppy/0u1040
/devfs/floppy/0u1120
/devfs/floppy/0u800
/devfs/floppy/0
/devfs/printers
/devfs/printers/0
I go that by using the command:
mount -t devfs /devfs /devfs
... since I'm just playing with devfs for now.

(?) thx in adv!
-ion

(!) That should help. It's probably best for you to upgrade to 2.4... and play with it. That's likely to have the most stable support for devfs.
Keep in mind that you should consider this feature and the whole 2.3 and 2.4.0test* kernel series to be experimental. You should get a few months (or at least weeks) of testing on them done before deploying them in a production server role.


Copyright © 2000, James T. Dennis
Published in The Linux Gazette Issue 55 July 2000
HTML transformation by Heather Stern of Tuxtops, Inc., http://www.tuxtops.com/


[ Answer Guy Current Index ] greetings   1   2   3   4   5   6   7   8   9   10   11   12   13  
14   15   16   17   18   19   20   21   22  
[ Index of Past Answers ]


[ Prev ] [ Table of Contents ] [ Front Page ] [ FAQ ] [ Next ]