Logo Search packages:      
Sourcecode: makedev version File versions  Download package


.\" $Id: MAKEDEV.m,v 1.12 2001/11/01 17:34:27 nalin Exp $
.TH MAKEDEV 8 "26 June 2001" Linux "Linux Programmer's Manual"
MAKEDEV \- create devices
.B "cd dev; ./MAKEDEV -V"
.B "cd dev; ./MAKEDEV [ -d directory ] [ -c configdir ] [ -m maxdevices ] [-n] [-v] [-i] [-M] [-S]" " device ..."
is a program that will create the devices in \fC/dev\fR used to interface
with drivers in the kernel.
Note that programs giving the error ``ENOENT: No such file or
directory'' normally means that the device file is missing, whereas
``ENODEV: No such device'' normally means the kernel does not have the
driver configured or loaded.
.B \-V
Print out version and exit.
.B \-n
Do not actually update the devices, just print the actions that would be
.B \-M
Create symlinks, directories, and sockets belonging to the current user,
and print out the list of devices which would be created in a format
which is understood by RPM.
.B \-S
Do not actually update the devices, just print the actions that would be
performed in a format which can be fed to a shell.
.B \-d directory
Create the devices under \fBdirectory\fR instead of the default (usually
.B \-v
Be verbose.  Print out the actions as they are performed.  This is the
same output as produced by the \fB-n\fR option.
.B \-i
Ignore errors parsing configuration files.
Since there is currently no standardization in what names are used for
system users and groups, it is possible that you may need to modify
\fBMAKEDEV\fR's configuration files to reflect your site's settings.
Certain devices are required for minimal functionality.  These are:
.B mem
\- access to physical memory;
.B kmem
\- access to kernel virtual memory;
.B null
\- null device (infinite sink);
.B port
\- access to I/O ports;
.B zero
\- null byte source (infinite source);
.B core
\- symlink to \fB/proc/kcore\fR (for kernel debugging);
.B full
\- always returns ENOSPACE on write;
.B ram
\- ramdisk;
.B tty
\- to access the controlling tty of a process.
.B Virtual Terminals
.I console
This creates the devices associated with the console.  These are the virtual
terminals \fBtty\fIx\fR, where \fIx\fR can be from 0 though 63.  The device
\fItty0\fR is the currently active VT, and is also known as \fCconsole\fR.
For each VT, there are two devices: \fBvcs\fIx\fR and \fBvcsa\fIx\fR,
which can be used to generate screen-dumps of the VT (\fBvcs\fIx\fR is just the
text, and \fBvcsa\fIx\fR includes the attributes).
.B Serial Devices
.I ttyS{0..63}
Serial ports.
.B Pseudo Terminals
.I pty[p-s]
Each possible argument will create a bank of 16 master and slave
pairs.  The current kernel (1.2) is limited to 64 such pairs.
The master pseudo-terminals are 
.BR pty[p-s][0-9a-f] ,
and the slaves are
.BR tty[p-s][0-9a-f] .
.B Parallel Ports
.I lp
Standard parallel ports.  The devices are created 
.BR lp0 , 
.BR lp1 ,
.BR lp2 .
.B Bus Mice
.I busmice
The various bus mice devices.  This creates the following devices:
.B logimouse
(Logitech bus mouse),
.B psmouse
(PS/2-style mouse),
.B msmouse
(Microsoft Inport bus mouse) and
.B atimouse
(ATI XL bus mouse) and
.B jmouse
.B Joystick Devices
.I js
Joystick.  Creates 
.B js0
.BR js1 .
.B Disk Devices
.I fd[0-7]
Floppy disk devices.  The device
.BI fd x
is the device which autodetects the format, and the additional devices are
fixed format (whose size is indicated in the name).
The other devices are named as
.BI fd xLn .
The single letter
.I L
identifies the type of floppy disk (d = 5.25" DD, h = 5.25" HD, D = 3.5"
DD, H = 3.5" HD, E = 3.5" ED).  The number
.I n
represents the capacity of that format in K.  Thus the standard formats
.BI fd x d360 ,
.BI fd x h1200 ,
.BI fd x D720 ,
.BI fd x H1440 ,
.RI fd x E2880 .
For more information see Alain Knaff's fdutils package.
.BI fd0 *
.BI fd3 *
are floppy disks on the first controller, and devices
.BI fd4 *
.BI fd7 *
are floppy disks on the second controller.
.I hd[a-d]
AT hard disks.  The device
.BI hd x
provides access to the whole disk, with the partitions being
.BI hd x .
The four primary partitions are
.BI hd x 1
.BI hd x 4,
with the logical partitions being numbered from
.BI hd x 5
.BI hd x 20.
(A primary partition can be made into an extended partition, which can hold
4 logical partitions).
By default, only the devices for 4 logical partitions are made.  The
others can be made by uncommenting them.
Drives hda and hdb are the two on the first controller.  If using the new
IDE driver (rather than the old HD driver), then hdc and hdd are the two
drives on the secondary controller.  These devices can also be used to
acess IDE CDROMs if using the new IDE driver.
.I xd[a-d] 
XT hard disks.  Partitions are the same as IDE disks.
.I sd[a-z], sd[a-c][a-z], sdd[a-x]
SCSI hard disks.  The partitions are similar to the IDE disks, but there
is a limit of 11 logical partitions
.RI (sd x 5
.RI sd x 15).
This is to allow there to be 128 SCSI disks.
.I loop
Loopback disk devices.  These allow you to use a regular file as a
block device.  This means that images of filesystems can be mounted,
and used as normal.  This creates 16 devices loop0 through loop15.
.B Tape Devices
.I st
SCSI tapes.  This creates the rewinding tape device
.BI st x
and the non-rewinding tape device
.BI nst x .
.I qic
QIC-80 tapes.  The devices created are
.BR rmt8 ,
.BR rmt16 ,
.BR tape-d ,
.BR tape-reset .
.I ftape
Floppy driver tapes (QIC-117).  There are 4 methods of access depending on
the floppy tape drive.  For each of access methods 0, 1, 2 and 3, the
.BI rft x
(rewinding) and
.BI nrft x
(non-rewinding) are created.  For compatability, devices
.B ftape
.B nftape
are symlinks to
.B rft0
.B nrft0
.B CDROM Devices
.I scd[0-7]
SCSI CD players.
.I sonycd
Sony CDU-31A CD player.
.I mcd
Mitsumi CD player.
.I cdu535
Sony CDU-535 CD player.
.I lmscd
LMS/Philips CD player.
.I sbpcd{,1,2,3}
Sound Blaster CD player.  The kernel is capable of supporting 16 CDROMs,
each of which is accessed as
.BR sbpcd[0-9a-f] .
These are assigned in groups of 4 to each controller.
.B sbpcd
is a symlink to
.BR sbpcd0 .
.\" .TP
.\" .I idecd
.\" NEC CDR-260 (note: this will probably be obsoleted by the new IDE driver).
.B Scanner
.I logiscan
Logitech ScanMan32 & ScanMan 256.
.I m105scan
Mustek M105 Handscanner.
.I ac4096
A4Tek Color Handscanner.
.B Audio
.I sound
This creates the audio devices used by the sound driver.  These include
.BR mixer ,
.BR sequencer ,
.BR dsp ,
.BR audio .
.B Miscellaneous
.I sg
Generic SCSI devices.  The devices created are 
.B sga
.B sgh
.B sg0
.BR sg7 .
These allow arbitary commands to be sent to any SCSI device.  This allows for
querying information about the device, or controlling SCSI devices that
are not one of disk, tape or CDROM (e.g. scanner, CD-R, CD-RW).
.I fd
To allow an arbitary program to be fed input from file descriptor
.IR x ,
.BI /dev/fd/ x
as the file name.  This also creates 
.BR /dev/stdin ,
.BR /dev/stdout ,
.BR /dev/stderr .
(Note, these are just symlinks into /proc/self/fd).
.I ibcs2
Devices (and symlinks) needed by the IBCS2 emulation.
.I apm
Devices for power management.
.B "Network Devices"
Linux used to have devices in /dev for controlling network devices, but
that is no longer the case.  To see what network devices are known by the
kernel, look in /proc/net/dev.
.B "Other Devices"
Note that the list of devices above is not exhaustive.  MAKEDEV can create
more devices nodes.  Its aim is to be able to create everything listed in the
\fBdevices.txt\fR file distributed with Linux 2.4.

MAKEDEV doesn't actually know anything about devices.  It reads all of the
information from files stored in \fB/etc/makedev.d\fR.  MAKEDEV will read any
and all files in the subdirectory, processing lines in them like so:
.B devices
.B [b|c]
mode owner group major minor inc count fmt [base]
\fIcount\fR devices will be created, with permissions set to \fImode\fR and
owned by \fIowner\fR and \fIgroup\fR.  The first device will be named \fIfmt\fR,
and additional devices will be created if \fIcount\fR is larger than 1.
If \fIfmt\fR contains a C-style formatting string, it will be filled with the
sum of \fIbase\fR and zero.  Subsequent devices will be filled with the sum of
\fIbase\fR and \fIn\fR * \fIinc\fR, where \fIn\fR is the order this device is
being created in.  If the format string did not already include a format
specifier, a "%d" will automatically be appended to it to make this work.
.B symbolic links
.B l
linkname target
A symbolic link pointing to \fItarget\fR named \fIlinkname\fR will be created.
.B aliases
.B a
alias value
Any commands that create devices for \fIalias\fR will also include devices that
would be crated for \fIvalue\fR.

Linux Allocated Devices, maintained by H.\ Peter Anvin,
Let's hope not.  If we're lucky, any problems we'll find will be confined to
the configuration files, which were written by examining the devices.txt file.
Nalin Dahyabhai, based largely on work done by
Nick Holloway
Michael K. Johnson.

Generated by  Doxygen 1.6.0   Back to index