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