2 .\" Copyright (c) 1993 Michael Haardt (michael@cantor.informatik.rwth-aachen.de)
3 .\" and 1994,1995 Alain Knaff (Alain.Knaff@imag.fr)
5 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
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.
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.
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.
21 .\" You should have received a copy of the GNU General Public
22 .\" License along with this manual; if not, see
23 .\" <http://www.gnu.org/licenses/>.
26 .\" Modified, Sun Feb 26 15:00:02 1995, faith@cs.unc.edu
28 .TH FD 4 2014-05-10 "Linux" "Linux Programmer's Manual"
30 fd \- floppy disk device
32 Floppy drives are block devices with major number 2.
36 (i.e., user root, group floppy) and have
37 either mode 0660 (access checking via group membership) or mode 0666
38 (everybody has access).
40 numbers encode the device type, drive number, and controller number.
41 For each device type (that is, combination of density and track count)
42 there is a base minor number.
43 To this base number, add the drive's
44 number on its controller and 128 if the drive is on the secondary
46 In the following device tables, \fIn\fP represents the
49 \fBWarning: If you use formats with more tracks
50 than supported by your drive, you may cause it mechanical damage.\fP
51 Trying once if more tracks than the usual 40/80 are supported should not
52 damage it, but no warranty is given for that.
53 If you are not sure, don't create device
54 entries for those formats, so as to prevent their usage.
56 Drive-independent device files which automatically detect the media
65 5.25 inch double-density device files:
68 Name Capac. Cyl. Sect. Heads Base minor #
70 \fBfd\fP\fIn\fP\fBd360\fP 360K 40 9 2 4
73 5.25 inch high-density device files:
76 Name Capac. Cyl. Sect. Heads Base minor #
78 \fBfd\fP\fIn\fP\fBh360\fP 360K 40 9 2 20
79 \fBfd\fP\fIn\fP\fBh410\fP 410K 41 10 2 48
80 \fBfd\fP\fIn\fP\fBh420\fP 420K 42 10 2 64
81 \fBfd\fP\fIn\fP\fBh720\fP 720K 80 9 2 24
82 \fBfd\fP\fIn\fP\fBh880\fP 880K 80 11 2 80
83 \fBfd\fP\fIn\fP\fBh1200\fP 1200K 80 15 2 8
84 \fBfd\fP\fIn\fP\fBh1440\fP 1440K 80 18 2 40
85 \fBfd\fP\fIn\fP\fBh1476\fP 1476K 82 18 2 56
86 \fBfd\fP\fIn\fP\fBh1494\fP 1494K 83 18 2 72
87 \fBfd\fP\fIn\fP\fBh1600\fP 1600K 80 20 2 92
90 3.5 inch double-density device files:
93 Name Capac. Cyl. Sect. Heads Base minor #
95 \fBfd\fP\fIn\fP\fBu360\fP 360K 80 9 1 12
96 \fBfd\fP\fIn\fP\fBu720\fP 720K 80 9 2 16
97 \fBfd\fP\fIn\fP\fBu800\fP 800K 80 10 2 120
98 \fBfd\fP\fIn\fP\fBu1040\fP 1040K 80 13 2 84
99 \fBfd\fP\fIn\fP\fBu1120\fP 1120K 80 14 2 88
102 3.5 inch high-density device files:
105 Name Capac. Cyl. Sect. Heads Base minor #
107 \fBfd\fP\fIn\fP\fBu360\fP 360K 40 9 2 12
108 \fBfd\fP\fIn\fP\fBu720\fP 720K 80 9 2 16
109 \fBfd\fP\fIn\fP\fBu820\fP 820K 82 10 2 52
110 \fBfd\fP\fIn\fP\fBu830\fP 830K 83 10 2 68
111 \fBfd\fP\fIn\fP\fBu1440\fP 1440K 80 18 2 28
112 \fBfd\fP\fIn\fP\fBu1600\fP 1600K 80 20 2 124
113 \fBfd\fP\fIn\fP\fBu1680\fP 1680K 80 21 2 44
114 \fBfd\fP\fIn\fP\fBu1722\fP 1722K 82 21 2 60
115 \fBfd\fP\fIn\fP\fBu1743\fP 1743K 83 21 2 76
116 \fBfd\fP\fIn\fP\fBu1760\fP 1760K 80 22 2 96
117 \fBfd\fP\fIn\fP\fBu1840\fP 1840K 80 23 2 116
118 \fBfd\fP\fIn\fP\fBu1920\fP 1920K 80 24 2 100
121 3.5 inch extra-density device files:
124 Name Capac. Cyl. Sect. Heads Base minor #
126 \fBfd\fP\fIn\fP\fBu2880\fP 2880K 80 36 2 32
127 \fBfd\fP\fIn\fP\fBCompaQ\fP 2880K 80 36 2 36
128 \fBfd\fP\fIn\fP\fBu3200\fP 3200K 80 40 2 104
129 \fBfd\fP\fIn\fP\fBu3520\fP 3520K 80 44 2 108
130 \fBfd\fP\fIn\fP\fBu3840\fP 3840K 80 48 2 112
133 \fBfd\fP special files access the floppy disk drives in raw mode.
136 calls are supported by \fBfd\fP devices:
138 clears the media information of a drive (geometry of disk in drive).
140 sets the media information of a drive.
141 The media information will be
142 lost when the media is changed.
144 sets the media information of a drive (geometry of disk in drive).
145 The media information will not be lost when the media is changed.
146 This will disable autodetection.
147 In order to reenable autodetection, you
148 have to issue an \fBFDCLRPRM\fP.
149 .IP \fBFDGETDRVTYP\fP
150 returns the type of a drive (name parameter).
151 For formats which work
152 in several drive types, \fBFDGETDRVTYP\fP returns a name which is
153 appropriate for the oldest drive type which supports this format.
155 invalidates the buffer cache for the given drive.
156 .IP \fBFDSETMAXERRS\fP
157 sets the error thresholds for reporting errors, aborting the operation,
158 recalibrating, resetting, and reading sector by sector.
159 .IP \fBFDSETMAXERRS\fP
160 gets the current error thresholds.
161 .IP \fBFDGETDRVTYP\fP
162 gets the internal name of the drive.
163 .IP \fBFDWERRORCLR\fP
164 clears the write error statistics.
165 .IP \fBFDWERRORGET\fP
166 reads the write error statistics.
167 These include the total number of
168 write errors, the location and disk of the first write error, and the
169 location and disk of the last write error.
170 Disks are identified by a
171 generation number which is incremented at (almost) each disk change.
173 Switch the drive motor off for a few microseconds.
175 needed in order to access a disk whose sectors are too close together.
176 .IP \fBFDSETDRVPRM\fP
177 sets various drive parameters.
178 .IP \fBFDGETDRVPRM\fP
179 reads these parameters back.
180 .IP \fBFDGETDRVSTAT\fP
181 gets the cached drive state (disk changed, write protected et al.)
182 .IP \fBFDPOLLDRVSTAT\fP
183 polls the drive and return its state.
184 .IP \fBFDGETFDCSTAT\fP
185 gets the floppy controller state.
187 resets the floppy controller under certain conditions.
189 sends a raw command to the floppy controller.
191 For more precise information, consult also the \fI<linux/fd.h>\fP and
192 \fI<linux/fdreg.h>\fP include files, as well as the
193 .BR floppycontrol (1)
198 The various formats permit reading and writing many types of disks.
199 However, if a floppy is formatted with an inter-sector gap that is too small,
200 performance may drop,
201 to the point of needing a few seconds to access an entire track.
202 To prevent this, use interleaved formats.
204 It is not possible to
205 read floppies which are formatted using GCR (group code recording),
206 which is used by Apple II and Macintosh computers (800k disks).
208 Reading floppies which are hard sectored (one hole per sector, with
209 the index hole being a little skewed) is not supported.
210 This used to be common with older 8-inch floppies.
212 .\" Alain Knaff (Alain.Knaff@imag.fr), David Niemi
213 .\" (niemidc@clark.net), Bill Broadhurst (bbroad@netcom.com).
216 .BR floppycontrol (1),