[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

a few observations on converting /dev old device names to devfs, a few hints




On 29 Jan 2002, Dave Carrigan wrote:

> Walter Tautz <wtautz@math.uwaterloo.ca> writes:
> 
> > Would it not be better to have CONFIG_DEVFS_FS=n
> 
> Why?
> 
i suppose I was thinking interms of the overhead of having to do
what you mention below. Granted I experienced no real problems
without having to change anything. But it does seem to be a bit
of surprise as the default in the kernel documentation is not to
turn it on. At least this is what one reads in:

/usr/src/kernel-source-2.4.17/Documentation/filesystems/devfs/README:

<quote>
NOTE that devfs is entirely optional. If you prefer the old
disc-based device nodes, then simply leave CONFIG_DEVFS_FS=n (the
default). In this case, nothing will change.  ALSO NOTE that if you do
enable devfs, the defaults are such that full compatibility is
maintained with the old devices names.
</quote>

So the last line shows why I was still able to mount my partitions using
the old device names--good thing. I 


> > Anyone know how to create devfs? 
> 
> mount -t devfs - /dev

That worked but it creates weird time stamps:

# ls -al /dev/
total 4
drwxr-xr-x    1 root     root            0 Dec 31  1969 .
drwxr-xr-x   26 root     root         4096 Jan 29 14:58 ..
crw-------    1 root     root       8,   0 Dec 31  1969 .devfsd
crw-------    1 root     root       5,   1 Jan 29 15:08 console
drwxr-xr-x    1 root     root            0 Dec 31  1969 cpu
drwxr-xr-x    1 root     root            0 Dec 31  1969 cua
drwxr-xr-x    1 root     root            0 Dec 31  1969 discs
drwxr-xr-x    1 root     root            0 Dec 31  1969 fb
crw-rw-rw-    1 root     root       1,   7 Dec 31  1969 full
drwxr-xr-x    1 root     root            0 Dec 31  1969 ide
prw-------    1 root     root            0 Jan 29 15:05 initctl
drwxr-xr-x    1 root     root            0 Dec 31  1969 input
crw-r-----    1 root     root       1,   2 Dec 31  1969 kmem
crw-r-----    1 root     root       1,   1 Dec 31  1969 mem
drwxr-xr-x    1 root     root            0 Dec 31  1969 misc
crw-rw-rw-    1 root     root       1,   3 Dec 31  1969 null
crw-r-----    1 root     root       1,   4 Dec 31  1969 port
crw-rw-rw-    1 root     root       5,   2 Dec 31  1969 ptmx
drwxr-xr-x    1 root     root            0 Dec 31  1969 pts
drwxr-xr-x    1 root     root            0 Dec 31  1969 pty
crw-r--r--    1 root     root       1,   8 Dec 31  1969 random
drwxr-xr-x    1 root     root            0 Dec 31  1969 rd
lr-xr-xr-x    1 root     root            4 Dec 31  1969 root -> rd/0
drwxr-xr-x    1 root     root            0 Dec 31  1969 shm
drwxr-xr-x    1 root     root            0 Dec 31  1969 tts
crw-rw-rw-    1 root     root       5,   0 Dec 31  1969 tty
crw-r--r--    1 root     root       1,   9 Dec 31  1969 urandom
drwxr-xr-x    1 root     root            0 Dec 31  1969 usb
drwxr-xr-x    1 root     root            0 Dec 31  1969 vc
drwxr-xr-x    1 root     root            0 Dec 31  1969 vcc
crw-rw-rw-    1 root     root       1,   5 Dec 31  1969 zero


And even worse, it got rid of the old device names, yikes. Warning folks!


> apt-get install devfsd

Good news....this step recreates the old device names
as softlinks. Whew! Boy these kernel dudes are way cool!

> 
> >   cramfs: wrong magic
> > 
> > What is cramfs?
> 
> Compressed ramdisk filesystem. Useful for initrd's. The wrong magic
> message is probably from the kernel's attempt to auto-determine the
> filesystem during a mount.
> 
> > Just curious to hear other people's opinions on this matter, i.e.
> > don't use devfs. It seems to me the debian kernel should have 
> > CONFIG_DEVFS_FS=n. 
> 
> Some people want devfs. Devfs can't be created as a module. Hence, the
> logical choice is to build the kernel with devfs support. Nothing's
> forcing you to use devfs, even if your kernel has devfs support, and the
> overhead is not very much.
> 
> -- 
You're quite right...as it turns out things worked even without constructed
devfs. Thanks Dave!


-walter



Reply to: