]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man4/fd.4
Many pages: Use correct letter case in page titles (TH)
[thirdparty/man-pages.git] / man4 / fd.4
CommitLineData
fea681da
MK
1.\" Copyright (c) 1993 Michael Haardt (michael@cantor.informatik.rwth-aachen.de)
2.\" and 1994,1995 Alain Knaff (Alain.Knaff@imag.fr)
3.\"
e4a74ca8 4.\" SPDX-License-Identifier: GPL-2.0-or-later
fea681da
MK
5.\"
6.\" Modified, Sun Feb 26 15:00:02 1995, faith@cs.unc.edu
7.\"
4c1c5274 8.TH fd 4 (date) "Linux man-pages (unreleased)"
fea681da
MK
9.SH NAME
10fd \- floppy disk device
11.SH CONFIGURATION
c13182ef
MK
12Floppy drives are block devices with major number 2.
13Typically they
a98b7568 14are owned by
6f5b156b 15root:floppy
a98b7568 16(i.e., user root, group floppy) and have
fea681da 17either mode 0660 (access checking via group membership) or mode 0666
c13182ef
MK
18(everybody has access).
19The minor
fea681da
MK
20numbers encode the device type, drive number, and controller number.
21For each device type (that is, combination of density and track count)
c13182ef
MK
22there is a base minor number.
23To this base number, add the drive's
fea681da 24number on its controller and 128 if the drive is on the secondary
c13182ef
MK
25controller.
26In the following device tables, \fIn\fP represents the
fea681da
MK
27drive number.
28.PP
f64cc745 29\fBWarning: if you use formats with more tracks
c13182ef
MK
30than supported by your drive, you may cause it mechanical damage.\fP
31Trying once if more tracks than the usual 40/80 are supported should not
32damage it, but no warranty is given for that.
a98b7568
MK
33If you are not sure, don't create device
34entries for those formats, so as to prevent their usage.
fea681da 35.PP
a98b7568 36Drive-independent device files which automatically detect the media
fea681da 37format and capacity:
fea681da 38.TS
afb98b84
MK
39l c
40l c.
41Name Base
42 minor #
fea681da
MK
43_
44\fBfd\fP\fIn\fP 0
45.TE
46.PP
4d7bd2ae 475.25 inch double-density device files:
fea681da 48.TS
afb98b84 49lw(1i) l l l l c
68cd2713 50lw(1i) c c c c c.
afb98b84
MK
51Name Capacity Cyl. Sect. Heads Base
52 KiB minor #
fea681da 53_
21157756 54\fBfd\fP\fIn\fP\fBd360\fP 360 40 9 2 4
fea681da
MK
55.TE
56.PP
4d7bd2ae 575.25 inch high-density device files:
fea681da 58.TS
afb98b84 59lw(1i) l l l l c
68cd2713 60lw(1i) c c c c c.
afb98b84
MK
61Name Capacity Cyl. Sect. Heads Base
62 KiB minor #
fea681da 63_
21157756
BIG
64\fBfd\fP\fIn\fP\fBh360\fP 360 40 9 2 20
65\fBfd\fP\fIn\fP\fBh410\fP 410 41 10 2 48
66\fBfd\fP\fIn\fP\fBh420\fP 420 42 10 2 64
67\fBfd\fP\fIn\fP\fBh720\fP 720 80 9 2 24
68\fBfd\fP\fIn\fP\fBh880\fP 880 80 11 2 80
69\fBfd\fP\fIn\fP\fBh1200\fP 1200 80 15 2 8
70\fBfd\fP\fIn\fP\fBh1440\fP 1440 80 18 2 40
71\fBfd\fP\fIn\fP\fBh1476\fP 1476 82 18 2 56
72\fBfd\fP\fIn\fP\fBh1494\fP 1494 83 18 2 72
73\fBfd\fP\fIn\fP\fBh1600\fP 1600 80 20 2 92
fea681da 74.TE
66d2464f 75.PP
4d7bd2ae 763.5 inch double-density device files:
fea681da 77.TS
afb98b84 78lw(1i) l l l l c
68cd2713 79lw(1i) c c c c c.
afb98b84
MK
80Name Capacity Cyl. Sect. Heads Base
81 KiB minor #
fea681da 82_
21157756
BIG
83\fBfd\fP\fIn\fP\fBu360\fP 360 80 9 1 12
84\fBfd\fP\fIn\fP\fBu720\fP 720 80 9 2 16
85\fBfd\fP\fIn\fP\fBu800\fP 800 80 10 2 120
86\fBfd\fP\fIn\fP\fBu1040\fP 1040 80 13 2 84
87\fBfd\fP\fIn\fP\fBu1120\fP 1120 80 14 2 88
fea681da
MK
88.TE
89.PP
4d7bd2ae 903.5 inch high-density device files:
fea681da 91.TS
afb98b84 92lw(1i) l l l l c
68cd2713 93lw(1i) c c c c c.
afb98b84
MK
94Name Capacity Cyl. Sect. Heads Base
95 KiB minor #
fea681da 96_
21157756
BIG
97\fBfd\fP\fIn\fP\fBu360\fP 360 40 9 2 12
98\fBfd\fP\fIn\fP\fBu720\fP 720 80 9 2 16
99\fBfd\fP\fIn\fP\fBu820\fP 820 82 10 2 52
100\fBfd\fP\fIn\fP\fBu830\fP 830 83 10 2 68
101\fBfd\fP\fIn\fP\fBu1440\fP 1440 80 18 2 28
102\fBfd\fP\fIn\fP\fBu1600\fP 1600 80 20 2 124
103\fBfd\fP\fIn\fP\fBu1680\fP 1680 80 21 2 44
104\fBfd\fP\fIn\fP\fBu1722\fP 1722 82 21 2 60
105\fBfd\fP\fIn\fP\fBu1743\fP 1743 83 21 2 76
106\fBfd\fP\fIn\fP\fBu1760\fP 1760 80 22 2 96
107\fBfd\fP\fIn\fP\fBu1840\fP 1840 80 23 2 116
108\fBfd\fP\fIn\fP\fBu1920\fP 1920 80 24 2 100
fea681da
MK
109.TE
110.PP
4d7bd2ae 1113.5 inch extra-density device files:
fea681da 112.TS
afb98b84 113lw(1i) l l l l c
68cd2713 114lw(1i) c c c c c.
afb98b84
MK
115Name Capacity Cyl. Sect. Heads Base
116 KiB minor #
fea681da 117_
21157756
BIG
118\fBfd\fP\fIn\fP\fBu2880\fP 2880 80 36 2 32
119\fBfd\fP\fIn\fP\fBCompaQ\fP 2880 80 36 2 36
120\fBfd\fP\fIn\fP\fBu3200\fP 3200 80 40 2 104
121\fBfd\fP\fIn\fP\fBu3520\fP 3520 80 44 2 108
122\fBfd\fP\fIn\fP\fBu3840\fP 3840 80 48 2 112
fea681da
MK
123.TE
124.SH DESCRIPTION
125\fBfd\fP special files access the floppy disk drives in raw mode.
126The following
127.BR ioctl (2)
128calls are supported by \fBfd\fP devices:
4279e42d
AC
129.TP
130.B FDCLRPRM
fea681da 131clears the media information of a drive (geometry of disk in drive).
4279e42d
AC
132.TP
133.B FDSETPRM
c13182ef
MK
134sets the media information of a drive.
135The media information will be
fea681da 136lost when the media is changed.
4279e42d
AC
137.TP
138.B FDDEFPRM
c13182ef
MK
139sets the media information of a drive (geometry of disk in drive).
140The media information will not be lost when the media is changed.
141This will disable autodetection.
3b777aff 142In order to reenable autodetection, you
8478ee02 143have to issue an \fBFDCLRPRM\fP.
4279e42d
AC
144.TP
145.B FDGETDRVTYP
c13182ef
MK
146returns the type of a drive (name parameter).
147For formats which work
fea681da
MK
148in several drive types, \fBFDGETDRVTYP\fP returns a name which is
149appropriate for the oldest drive type which supports this format.
4279e42d
AC
150.TP
151.B FDFLUSH
fea681da 152invalidates the buffer cache for the given drive.
4279e42d
AC
153.TP
154.B FDSETMAXERRS
fea681da
MK
155sets the error thresholds for reporting errors, aborting the operation,
156recalibrating, resetting, and reading sector by sector.
4279e42d
AC
157.TP
158.B FDSETMAXERRS
fea681da 159gets the current error thresholds.
4279e42d
AC
160.TP
161.B FDGETDRVTYP
fea681da 162gets the internal name of the drive.
4279e42d
AC
163.TP
164.B FDWERRORCLR
fea681da 165clears the write error statistics.
4279e42d
AC
166.TP
167.B FDWERRORGET
c13182ef
MK
168reads the write error statistics.
169These include the total number of
fea681da 170write errors, the location and disk of the first write error, and the
c13182ef
MK
171location and disk of the last write error.
172Disks are identified by a
fea681da 173generation number which is incremented at (almost) each disk change.
4279e42d
AC
174.TP
175.B FDTWADDLE
c13182ef
MK
176Switch the drive motor off for a few microseconds.
177This might be
fea681da 178needed in order to access a disk whose sectors are too close together.
4279e42d
AC
179.TP
180.B FDSETDRVPRM
fea681da 181sets various drive parameters.
4279e42d
AC
182.TP
183.B FDGETDRVPRM
fea681da 184reads these parameters back.
4279e42d
AC
185.TP
186.B FDGETDRVSTAT
fea681da 187gets the cached drive state (disk changed, write protected et al.)
4279e42d
AC
188.TP
189.B FDPOLLDRVSTAT
fea681da 190polls the drive and return its state.
4279e42d
AC
191.TP
192.B FDGETFDCSTAT
fea681da 193gets the floppy controller state.
4279e42d
AC
194.TP
195.B FDRESET
fea681da 196resets the floppy controller under certain conditions.
4279e42d
AC
197.TP
198.B FDRAWCMD
fea681da
MK
199sends a raw command to the floppy controller.
200.PP
c84371c6 201For more precise information, consult also the \fI<linux/fd.h>\fP and
8b1bda66
YK
202\fI<linux/fdreg.h>\fP include files, as well as the
203.BR floppycontrol (1)
204manual page.
2b2581ee 205.SH FILES
dcaab7a3 206.I /dev/fd*
fea681da 207.SH NOTES
a98b7568
MK
208The various formats permit reading and writing many types of disks.
209However, if a floppy is formatted with an inter-sector gap that is too small,
210performance may drop,
211to the point of needing a few seconds to access an entire track.
c13182ef 212To prevent this, use interleaved formats.
2dad4c59 213.PP
c13182ef 214It is not possible to
fea681da
MK
215read floppies which are formatted using GCR (group code recording),
216which is used by Apple II and Macintosh computers (800k disks).
2dad4c59 217.PP
fea681da 218Reading floppies which are hard sectored (one hole per sector, with
c13182ef 219the index hole being a little skewed) is not supported.
a98b7568 220This used to be common with older 8-inch floppies.
d2dc6294
MK
221.\" .SH AUTHORS
222.\" Alain Knaff (Alain.Knaff@imag.fr), David Niemi
223.\" (niemidc@clark.net), Bill Broadhurst (bbroad@netcom.com).
47297adb 224.SH SEE ALSO
fea681da
MK
225.BR chown (1),
226.BR floppycontrol (1),
227.BR getfdprm (1),
228.BR mknod (1),
229.BR superformat (1),
230.BR mount (8),
231.BR setfdprm (8)