devfs
[Top] [All Lists]

Re: Some basic problems with devfs

To: Martin Costabel <costabel@xxxxxxxxxx>
Subject: Re: Some basic problems with devfs
From: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Date: Thu, 13 Apr 2000 00:32:21 -0600
Cc: devfs@xxxxxxxxxxx
In-reply-to: <38D56BBC.3F4B01F6@wanadoo.fr>
References: <200003151742.JAA17128@nova.botz.org> <38D56BBC.3F4B01F6@wanadoo.fr>
Sender: owner-devfs@xxxxxxxxxxx
Martin Costabel writes:
> Hi,
> 
> I have only recently started to use kernels with devfs enabled, and I
> have some newbie questions. I don't know if this list is the right place
> to ask them, but this is already my first question:
> 
> Is there a faq or howto for devfs, other than the far too short and
> technical kernel source filesystems/devfs/README? By wading through
> thousands of linux-kernel messages, I found some informations, so I am
> now starting "devfsd /dev" at the beginning of rc.sysinit, and I have
> learned from Doug Gilbert's page at
> http://www.torque.net/sg/devfs_scsi.html how to open some security holes
> so that I can login as root or start X as non-root.

FAQ under construction.

> But a couple of things still don't work, in particular my printer,
> floppy, cd, and gpm, and this leads to 3 different questions:
> 
> 1. My printer uses /dev/ttyS1, and when I used devfs for the first time
> with kernel 2.3.51, there was no such device. Instead of ttyS0-3 there
> was only a /dev/ttyS with major 4, minor 64. 3 days ago, I booted with a
> kernel 2.3.52, and suddenly the devices ttyS0 and ttyS1 (which
> correspond to the 2 serial ports I have) were back. Printing worked. Now
> yesterday I booted with 2.3.99-pre2, and I was back to square one: no
> ttyS1, only a ttyS. All 3 kernels used basically the same config options
> and the same kernel command line, and devfsd was started automatically
> in the same way. Where does this difference come from and how can I make
> sure that devfsd creates ttyS0 and ttyS1 as, according to README, it is
> supposed to do? Where does devfsd get its list of devices from? How does
> it decide which ones to create?

The devices are created by the drivers, not by devfsd. Devfsd will
only create compatibility symlinks (no real device nodes).

> 2. There is no /dev/floppy nor fd0 or whatever. ToDo mentions that
> swim3 is not yet supported. I have a Pmac 6400, and swim3 is its
> floppy controller.  Is there any way to use this floppy with devfs?

Hack the code.

> How hard is it to add devfs support to drivers/block/swim3.c?

Should be fairly easy.

> 3. Gpm doesn't start because /dev/mouse is missing. Normally, this
> is a symlink to /dev/adbmouse. If I make such a link, it will
> disappear upon reboot. Same problem with /dev/cdrom, /dev/modem and
> many others that are created either by some programs or by myself
> using mknod or symlinks. Is there a way to tell devfsd about such
> things so that devfsd recreates them at reboot? The documentation on
> devfsd (man devfsd) is too rudimentary to know. Does one have to use
> the rc.devfs script and store these informations in some tar file?

It's your choice. Probably editing your boot scripts is easier.

Ultimately, having a /dev/mice or a /dev/mouse managed by the kernel
might be better. Just like with /dev/cdroms.

> Or is the recommended way after all to use 2 directories, /devfs for
> devfs to play with, and /dev for the use of the rest of the kernel
> with symlinks between the two?

No.

                                Regards,

                                        Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current:   rgooch@xxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>