From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) Subject: Re: Device names (was Re: ttys2 not responding) Date: 12 Jul 1992 18:13:59 GMT
In article <710808938.F00117@remote.halcyon.com> Rob.Levin@f217.n3802.z1.fidonet.org (Rob Levin) writes:
>
>Well, if we're going to be consistent, shouldn't we *then* change the
>*local* consoles to tty[0-7]? Otherwise, we have tty[1-8], but
>ttys[0-3], which isn't terribly consistent....
If you don't have tty0, your installation is lacking: tty0-8 are
perfectly valid console devices. BUT tty0 is special: it's not limited
to just one of the virtual consoles, but is always the current one.
tty0 should be used if you have some important message that you want to
make /sure/ is printed on the console regardless of which VC is in use
(the same way kernel messages are always printed to the current console)
If you don't have the tty0 device, you should create it with
# mknod /dev/tty0 c 4 0
and also make the /dev/console the same device (either by linking or
making a similar special file for it).
>Well, far be it from me to splash water, doesn't the existence of
>/dev/fd0 and /dev/fd1 sort of render all this complication *moot*? Are
>there any situations where autodetect could *not* be used successfully?
>If not, are there any situations where one would *want* to use the more
>cumbersome forms simply for consistency purposes?
There are some circumstances where the auto-detect floppies cannot be
used: the most obvious of these is when formatting disks, as there is no
way for the driver to auto-detect an unformatted floppy.
Also, if somebody wants to make his own floppy formats and code them
into the kernel (and it's not too hard to do), the new floppy naming
scheme will hopefully give him/her obvious names for the non-standard
devices even though the auto-detect code doesn't recognize them. Having
a fairly obvious naming standard for these kinds of devices shouldn't
hurt.
>P.S. Shouldn't we consider starting our hard disk partitions with
>/dev/hda0...? If not, why not...? ;-)
Actually, the current /dev/hda is a kind of /dev/hda0 (check the minor
device numbers) - but in order to make doubly sure that nobody confuses
the device with a normal partition (/dev/hda is the whole first HD), I
decided on the current numbering when I finally chucked the minix naming
over-board. I haven't regretted it: while there were no end of problems
with the old names, everybody seems to understand the new naming
conventions.
[ For those that don't remember the old minix naming mess: /dev/hd0 was
the current /dev/hda, /dev/hd1 was /dev/hda1... /dev/hd5 was /dev/hdb,
/dev/hd6 was /dev/hdb1. The numbers were directly linked with the minix
minor numbers, and resulted in major confusion ]
Linux