From: rick@ee.uwm.edu (Rick Miller - Linux Device Registrar)
Newsgroups: comp.os.linux.announce
Subject: [NEW]: The Linux Device List
Date: 4 May 1993 20:55:00 +0300
Approved: linux-announce@tc.cornell.edu (Lars Wirzenius)
Message-ID: <1s6alkINN5o5@hydra.Helsinki.FI>

               T H E   L I N U X   D E V I C E   L I S T

   maintained by rick@ee.uwm.edu (Rick Miller - Linux Device Registrar)

                     Last revised:  May 4, 1993

This is a list of the device names, along with Major and minor numbers,
which the Linux kernel may currently recognize.  I say "may" because some
of them may require patches to your kernel, others must be configured-in
using the Linux kernel's "make config" routine before compiling.

My profuse thanks to all the writers of device drivers for Linux, and to
all those patient folks who took the time to explain their devices to me.
May they become obscenely rich.  Until then, I hope this list will help
prevent driver collisions and perhaps lend a clue to a newbie or two.

(NEW:	At the end of this list is a short collection of useful names
	which may help newbies adjust to Linux from DOS or other unices.)


	IF YOU WANT ANY CHANGES OR ADDITIONS TO THIS LIST, *TELL ME*!

	DEVICES NOT LISTED HERE SHOULD USE MAJOR NUMBERS *ABOVE 127*
	UNTIL ALLOCATED A MORE PERMANENT NUMBER IN THE LOWER RANGE.
	(I suggest using a more-or-less random number to avoid the
	 chance of collisions with any other experimental drivers.)

	TO HAVE MAJOR/MINOR NUMBERS ALLOCATED (OFFICIALLY) FOR
	YOUR DEVICE DRIVER, SEND E-MAIL TO:  RICK@EE.UWM.EDU

NEW TWISTS:

	1.) You guessed it, I've renamed the serial lines *AGAIN*.
		This time, after lobbing gobs of suggestions into
		comp.os.linux, I've settled on a scheme that has
		taken hold of its own accord.  Several people had
		manually re-named their devices, just because they
		thought it was such a good idea.

		Of course, the idea wasn't even *mine*.  :-/

	2.) I'm adding a short list of "other names" which may be
		found in the /dev directory for the sake of newbies
		and compatibility with other unices.

REQUESTS FROM THE REGISTRAR:

	1.) If you've written a driver, PLEASE read at least the section
		of this list that deals with it, and make sure it's right.
		If your section has ???'s in it, please give me the info.

	2.) Did anyone ever use Major number "0"?  Is anyone still using
		it for anything?  Why am I listing it??

	3.) Would some kind soul explain to me the difference between
		the drivers for Major numbers 9 and 12?  Aren't they
		*both* SCSI??

	4.) Does anyone know anything about the "QIC-80 Colorado 250
		tape drive which attatches to the floppy ribbon" ?

Majors:
  0.  Unnamed .......  (unknown) ....  for proc-fs, NFS clients, etc. (???)
  1.  Memory ........  (character) ..  mem ramdisk kmem null port zero etc.
  2.  Floppy ........  (block) ......  fd[0-3]<[dhDH]{360,720,1200,1440}>
  3.  AT-Disk .......  (block) ......  hd[a-b]<[0-8]>
  4.  Tty ...........  (character) ..  tty's and pty's
  5.  Dial-out ......  (character) ..  tty cua*
  6.  Parallel ......  (character) ..  par[0-2] lp[0-2]
  8.  SCSI-Disk .....  (block) ......  sd[a-h]<[0-8]>
  9.  SCSI-Tape .....  (character) ..  <n>rst[0-1] or <n>rmt[0-1]
 10.  Mouse .........  (character) ..  logibm psaux inportbm atibm (mouse)
 11.  CD-ROM ........  (block) ......  scd[0-1]
 12.  QIC-tape? .....  (character) ..  rmt{8,16} tape<{-d,-reset}>
 13.  XT-disk .......  (block) ......  xd[a-b]<[0-8]>
 14.  Audio .........  (character) ..  audio dsp midi mixer sequencer
 15.  Joystick ......  (character) ..  js[0-1]
 16.  Socket ........  (character) ..  net arp
 17.  AF_UNIX .......  (character) ..  unix
 18.  AF_INET .......  (character) ..  inet ip icmp tcp udp
 19.  WE-driver .....  (character) ..  we[0-3]
 20.  DP8390-driver .  (character) ..  wd[0-3] ec[0-3] ne[0-3]
 21.  Sony-CD-ROM ...  (block) ......  sonycd
 22.  2nd AT-Cntrlr .  (block) ......  hd1[a-b]<[0-8]>
 23.  Mitsumi CD-ROM   (block) ......  mcd
 24.  Link Interface   (character?) .  ???

(Yes, I *know* there's no Major number "7".  It never got used.  Ya wannit?)

Breakdown of minors by Majors:
------------------------------
  0.  Unnamed .......  (unknown) ....  for proc-fs, NFS clients, etc.
	Minors?  Did this ever get used??

  1.  Memory ........  (character) ..  mem ramdisk kmem null port zero etc.
	(0.  /dev/ram:  was supposed to be the ramdisk, but never got used.
	 As of this date it has not been implemented and probably won't be.)
	1.  /dev/mem
	1.  /dev/ramdisk: a BLOCK device (the RAM-disk)
	2.  /dev/kmem
	3.  /dev/null
	4.  /dev/port
	5.  /dev/zero
	6.  /dev/core:  like /dev/mem, but in "core"-file format for gdb
	7.  /dev/full:  any write to this file will return ENOSP

  2.  Floppy ........  (block) ......  fd[0-3]<[dhDH]{360,720,1200,1440}>
	Minors are [[4 * type] + drive] where drive 0-3 == A:-D: (floppy)
	and type is:	0: Autodetect		4: 720k on 3.5" DD
			1: 360k on 5.25" DD	5: 360k on 5.25" HD
			2: 1.2M on 5.25" HD	6. 720k on 5.25" HD
			3: 360k on 3.5" DD	7. 1.44M on 3.5" HD

	0. /dev/fd0:  Autodetected first floppy.
	1. /dev/fd1:  Autodetected second floppy.
	2. /dev/fd2:  Autodetected third floppy.
	3. /dev/fd3:  Autodetected fourth floppy.
	4. /dev/fd0d360:  360k on 5.25" DD in first drive
	5. /dev/fd1d360:  360k on 5.25" DD in second drive
		(You can work out the rest of the intermediates...)
	8. /dev/fd0h1200:  1.2M on 5.25" HD in first drive
	12. /dev/fd0D360 (/dev/fd0H360):  360k on 3.5" DD in first drive
	16. /dev/fd0D720 (/dev/fd0H720):  720k on 3.5" DD in first drive
	20. /dev/fd0h360:  360k on 5.25" HD in first drive
	24. /dev/fd0h720:  720k on 5.25" HD in first drive
	28. /dev/fd0H1440:  1.44M on 3.5" HD in first drive

     Naming goes like this:
	fd[drive][media][size]
	 where: [drive]=0-3:  Corresponds to DOS's "A:"-"D:".
		[media]={d,h,D,H}:  d=Double Density 5.25" diskette
				    h=High Density 5.25" diskette
				    D=Double Density 3.5" diskette
				    H=High Density 3.5" diskette
		[size]={360,720,1200,1440} kilobytes.

     Floppies are assumed to be double-sided (DS), and
	drives are assumed to be high-density devices.

  3.  AT-Disk .......  (block) ......  hd[a-d]<[0-8]>
     (For IDE, MFM, and RLE drives and controllers.)
      On the first AT controller card:
	0.  /dev/hda (/dev/hda0):  The whole first HD, including its MBR.
	1-4.  /dev/hda{1-4}:  Primary partitions on the first hard drive.
	5-8.  /dev/hda{5-8}:  Extended partitions on the first hard drive.
	64.  /dev/hdb (/dev/hdb0):  The whole second HD, including its MBR.
	65-68.  /dev/hdb{1-4}:  Primary partitions on the second hard drive.
	69-72.  /dev/hdb{5-8}:  Extended partitions on the second hard drive.

	Notes:	BE *VERY* CAREFUL WITH the four "whole drive" devices (hda,
		hdb, hdc, and hdd)!!  These devices embody the *entire*
		*drive*, not just one partition.  The only things that use
		them are things that need to read/change the partition table
		(like fdisk).

		Linux doesn't order anything.  It perceives partitions in the
		order in which they appear in the partition table.  Thus,
		/dev/hd?1 may follow /dev/hd?2 in the cylinder numbering.

		The names of the hard drives are not the same as under Minix.

  4.  Tty ...........  (character) ..  tty's and pty's
	0.  /dev/tty0:  This is the currently active Virtual Console.
	1-63.  /dev/tty[1-63]:  Specific virtual consoles.
	64-127.  /dev/tty[S-V][0-f]:  Dial-in serial lines (note U/C letter)
	128-191.  /dev/pty[p-s][0-f]:  PTY Masters.
	192-255.  /dev/tty[p-s][0-f]:  PTY Slaves. ([0-f]=0123456789abcdef)

	Notes:  NOTICE THE NEW NAMING FOR SERIAL LINES (*AGAIN*).  Serial
		lines will be named either "tty..." or "cua..." (See Major 5)
		followed by a CAPITAL letter from S to V then a hexadecimal
		digit (in lower-case, like the PTY's).
		   This was only one of the suggested naming schemes, but
		it was *overwhelmingly* adopted by many, even before others
		had a chance to agree that it was useable.  I like it too.
		It's compatible with what we've been using, and makes sense.

		For more information on the use of multi-port boards, read
		the documentation which accompanies the serial patches.

  5.  Dial-out ......  (character) ..  tty cua*
	0.  /dev/tty:  the tty that owns the process calling it.
	64-127.  /dev/cua[S-V][0-f]:  Dial-out serial lines
		(See Major #4 for NEW NAMING CONVENTION.)

      (Note:  "cua" stands for "Call Unit Autodialer", and it means that
		you don't need a separate dialing-gizmo for that line.)

  6.  Parallel ......  (character) ..  par[0-2] lp[0-2]
     Parallel (printer) ports.  (Increasable in include/linux/lp.h)
	0.  /dev/par0 (/dev/lp0):  First XT parallel port
	1.  /dev/par1 (/dev/lp1):  First AT parallel port
	2.  /dev/par2 (/dev/lp2):  Second AT parallel port

	Notes:	The number of line printers is defined by LP_NO which is
		found in [/usr/src]/linux/include/lp.h.

  8.  SCSI-Disk .....  (block) ......  sd[a-h]<[0-8]>
	Minors numbers are ((16 * Drive) + Partition)
	where
	  Drive is the number of the physical drive in order of detection
	and
	  Partition is as follows:
		0   is the whole drive
		1-4 are the DOS "primary" partitions
		5-15 are the DOS "extended" (or "logical") partitions, so...

	0.  /dev/sda (/dev/sda0):  The first (detected) SCSI drive.
	1-4.  /dev/sda[1-4]:  Primary partitions on the first SCSI drive.
	5-15.  /dev/sda[5-15]:  Extended partitions on the first SCSI drive.
	16.  /dev/sdb (/dev/sdb0):  The second (detected) SCSI drive.
	17-20.  /dev/sdb[1-4]:  Primary partitions on the second drive.
	21-31.  /dev/sdb[5-15]:  Extended partitions on the second drive.
	32.  /dev/sdc (/dev/sdc0):  The third (detected) SCSI drive.
	...and so on.

  9.  SCSI-Tape .....  (character) ..  <n>st[0-1]
	0.  /dev/st0:  First (detected) SCSI tape drive, rewind-on-close.
	1.  /dev/st1:  Second (detected) SCSI tape drive, rewind-on-close.
	128.  /dev/nst0:  First (detected) SCSI tape, *no* rewind-on-close.
	129.  /dev/nst1:  Second (detected) SCSI tape, *no* rewind-on-close.

 10.  Mouse .........  (character) ..  logibm psaux inportbm atibm
     (MGR may require that /dev/mouse be linked to one of these...)
		NOTE THE CHANGES TO DIFFERENTIATE MOUSE TYPES!
		(Please implement these in the distributions.)
	0.  /dev/logibm:  Logitec-'compatible' bus mouse
	1.  /dev/psaux:  PS/2 mouse port (may not work on some lap-tops, yet)
	2.  /dev/inportbm:  MicroSoft "InPort" bus mouse
	3.  /dev/atibm:  ATI XL bus mouse

 11.  CD-ROM ........  (block) ......  scd[0-1]
	0.  /dev/scd0:  The first (detected) SCSI CD-ROM.
	1.  /dev/scd1:  The second (detected) SCSI CD-ROM.
	("There's not much more to it than that" says Eric Youngdale.)

 12.  QIC-tape? .....  (character) ..  rmt{8,16} tape<{-d,-reset}>
     (I really don't have much info on this one...
       These names *should* be more standard.)
	6.  /dev/rmt8:  QIC-120
	8.  /dev/rmt16 (/dev/tape):  QIC-150
	136.  /dev/tape-d:  (It has something to do with being 128+8... ?)
	255.  /dev/tape-reset:  For resetting only.

 13.  XT-disk .......  (block) ......  xd[a-b]<[0-8]>
     XT (8-bit) hard disk controller devices.
	Minor numbers are assigned in the same manner as for the
	normal (AT-type) Hard Drive devices ("/dev/hd*").

 14.  Audio .........  (character) ..  audio dsp midi mixer sequencer
      (DOES THIS SECTION NEED UPDATING???)
	0.  /dev/mixer:  Mixer and Control Device
	1.  /dev/sequencer:  FM-synthesizer and Midi
	2.  /dev/midi:  (for future use)
	3.  /dev/dsp:  Digitized voice (DAC/ADC)
	4.  /dev/audio:  (Reserved for compatibility with Sun)

 15.  Joystick ......  (character) ..  js[0-1]
	0.  /dev/js0:  (Left/Right?) joystick.
	1.  /dev/js1:  (Right/Left?) joystick.

 16.  Socket ........  (character) ..  net arp
	0.  /dev/net:  Generic layer (sockets)
	1.  /dev/arp:  Address Resolution Protocol (ARP)

 17.  AF_UNIX .......  (character) ..  unix
	0.  /dev/unix:  AF_UNIX protocol layer

 18.  AF_INET .......  (character) ..  inet ip icmp tcp udp
	0.  /dev/inet:  AF_INET protocol layer
	1.  /dev/ip:  Inernet Protocol (IP)
	2.  /dev/icmp:  Internet Control Message Protocol (ICMP)
	3.  /dev/tcp:  Transmission Control Protocol (TCP)
	4.  /dev/udp:  User Datagram Protocol (UDP)

 19.  WE-driver .....  (character) ..  we[0-3]
	0-3.  /dev/we[0-3]:  "WE" driver

 20.  DP8390-driver .  (character) ..  wd[0-3] ec[0-3] ne[0-3]
	0-3.  /dev/wd[0-3]:  "DP8390" driver, WD8003
	8-11.  /dev/ec[0-3]:  "DP8390" driver, 3C503
	16-19.  /dev/ne[0-3]:  "DP8390" driver, NE2000

 21.  Sony-CD-ROM ...  (block) ......  sonycd
	0.  /dev/sonycd:  Sony CDU-535 CD-ROM, I think.

 22.  2nd AT-Cntrlr .  (block) ......  hd1[a-b]<[0-8]>
     Minor numbers are like those of the primary AT-Disk controller.
	THIS MAY WORK FOR HARD-CARDS.
     (Note the "1" in the device name for the secondary controller.
      This is because we may eventually wish to change the names of
      the primary-controller drives to "hd0[a-b]...".)

	See also the notes for Major #3.

 23.  Mitsumi CD-ROM   (block) ......  mcd
     I don't know much about this one.
	Minors???

 24.  Link Interface   (character?) .  ???
	Minors???
     Link Interface for use with Christoph Niemann's driver for the
     INMOS C012-based high-speed serial link interface card (useful
     for talking to transputers or video digitizers).


Other names which aren't really 'official':
-------------------------------------------

Along with the 'official' Linux device names, there are some other names
commonly found in the /dev directory which may help folks find devices whose
names aren't immediately obvious.  These may be created either in the same
way the normal device files are created, or they may simply be links to the
'official' devices.  I personally recommend using symbolic links.

/dev/console -> /dev/tty0	(seems logical)

/dev/modem -> /dev/cuaS0	(or whichever is your modem)

/dev/mouse -> /dev/<whichever>	(I think "mgr" needs this one)

/dev/tty[a-d] -> /dev/ttyS[0-3] (to be compatable with some other unices)

/dev/COM[1-4] -> /dev/ttyS[0-3]	(for those with DOS hangups)

/dev/fd -> /proc/self/fd	(These support the "fd" ["File Descriptor"?]
/dev/stdin -> /dev/fd/0		 device through a symbolic link to the
/dev/stdout -> /dev/fd/1	 /proc filesystem.)
/dev/stderr -> /dev/fd/2

/dev/rmt* -> <tape drive>	(again, just to be nice)

That's it for this release of the Linux Device List.  Happy hacking!

Rick Miller  <rick@ee.uwm.edu> | <ricxjo@discus.mil.wi.us>   Ricxjo Muelisto
Send a postcard, get one back! | Enposxtigu bildkarton kaj vi ricevos alion!
          RICK MILLER // 16203 WOODS // MUSKEGO, WIS. 53150 // USA
