summaryrefslogtreecommitdiffstats
path: root/upstream/debian-bookworm/man4/fd.4
blob: 3eb65ef46dd53118fdc5509aef3ee4b4e7a026c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
'\" t
.\"{{{}}}
.\"{{{  Notes
.\" Copyright (c) 1993 Michael Haardt (michael@moria.de)
.\" and 1994,1995, 1997 Alain Knaff (alain@linux.lu)
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
.\" USA.
.\"}}}
.\"{{{  Title
.TH FD 4 "Jul 3, 1999" "Linux" "Special files"
.\"}}}
.\"{{{  Name
.SH NAME
fd \- floppy disk device
.\"}}}
.\"{{{  Configuration
.SH CONFIGURATION
Floppy drives are block devices with major number 2.  Typically they
are owned by root.floppy and have either mode 0660 (access checking via
group membership) or mode 0666 (everybody has access).  For the
following devices, \fIn\fP is the drive number.  It is 0 for the first
drive, 1 for the second etc.  To get a minor number for a specific
drive connected to the first controller, add \fIn\fP to the minor base
number.  If it is connected to the second controller, add \fIn\fP+128 to
the minor base number.  \fBWarning: If you use formats with more tracks
than supported by your drive, you may damage it mechanically.\fP  Trying
once if more tracks than the usual 40/80 are supported should not
damage it, but no warranty is given for that.  Don't create device
entries for those formats to prevent their usage if you are not sure.
.PP
.\"{{{  drive independent
Drive independent device files which automatically detect the media
format and capacity:
.PP
.TS
l l.
Name	Base minor #
_
\fBfd\fP\fIn\fP	0
.TE
.\"}}}
.PP
.\"{{{  5.25 DD
5.25 inch double density device files:
.PP
.TS
lw(1i) l l l l l.
Name	Capac.	Cyl.	Sect.	Heads	Base minor #
_
\fBfd\fP\fIn\fP\fBd360\fP	360K	40	9	2	4
.TE
.\"}}}
.PP
.\"{{{  5.25 HD
5.25 inch high density device files:
.PP
.TS
lw(1i) l l l l l.
Name	Capac.	Cyl.	Sect.	Heads	Base minor #
_
\fBfd\fP\fIn\fP\fBh360\fP	360K	40	9	2	20
\fBfd\fP\fIn\fP\fBh410\fP	410K	41	10	2	48
\fBfd\fP\fIn\fP\fBh420\fP	420K	42	10	2	64
\fBfd\fP\fIn\fP\fBh720\fP	720K	80	9	2	24
\fBfd\fP\fIn\fP\fBh880\fP	880K	80	11	2	80
\fBfd\fP\fIn\fP\fBh1200\fP	1200K	80	15	2	8
\fBfd\fP\fIn\fP\fBh1440\fP	1440K	80	18	2	40
\fBfd\fP\fIn\fP\fBh1476\fP	1476K	82	18	2	56
\fBfd\fP\fIn\fP\fBh1494\fP	1494K	83	18	2	72
\fBfd\fP\fIn\fP\fBh1600\fP	1600K	80	20	2	92
.TE
.\"}}}
.PP
.\"{{{  3.5 DD
3.5 inch double density device files:
.PP
.TS
lw(1i) l l l l l.
Name	Capac.	Cyl.	Sect.	Heads	Base minor #
_
\fBfd\fP\fIn\fP\fBu360\fP	360K	80	9	1	12
\fBfd\fP\fIn\fP\fBu720\fP	720K	80	9	2	16
\fBfd\fP\fIn\fP\fBu800\fP	800K	80	10	2	120
\fBfd\fP\fIn\fP\fBu1040\fP	1040K	80	13	2	84
\fBfd\fP\fIn\fP\fBu1120\fP	1120K	80	14	2	88
.TE
.\"}}}
.PP
.\"{{{  3.5 HD
3.5 inch high density device files:
.PP
.TS
lw(1i) l l l l l.
Name	Capac.	Cyl.	Sect.	Heads	Base minor #
_
\fBfd\fP\fIn\fP\fBu360\fP	360K	40	9	2	12
\fBfd\fP\fIn\fP\fBu720\fP	720K	80	9	2	16
\fBfd\fP\fIn\fP\fBu820\fP	820K	82	10	2	52
\fBfd\fP\fIn\fP\fBu830\fP	830K	83	10	2	68
\fBfd\fP\fIn\fP\fBu1440\fP	1440K	80	18	2	28
\fBfd\fP\fIn\fP\fBu1600\fP	1600K	80	20	2	124
\fBfd\fP\fIn\fP\fBu1680\fP	1680K	80	21	2	44
\fBfd\fP\fIn\fP\fBu1722\fP	1722K	82	21	2	60
\fBfd\fP\fIn\fP\fBu1743\fP	1743K	83	21	2	76
\fBfd\fP\fIn\fP\fBu1760\fP	1760K	80	22	2	96
\fBfd\fP\fIn\fP\fBu1840\fP	1840K	80	23	2	116
\fBfd\fP\fIn\fP\fBu1920\fP	1920K	80	24	2	100
.TE
.\"}}}
.PP
.\"{{{  3.5 ED
3.5 inch extra density device files:
.PP
.TS
lw(1i) l l l l l.
Name	Capac.	Cyl.	Sect.	Heads	Base minor #
_
\fBfd\fP\fIn\fP\fBu2880\fP	2880K	80	36	2	32
\fBfd\fP\fIn\fP\fBu3200\fP	3200K	80	40	2	104
\fBfd\fP\fIn\fP\fBu3520\fP	3520K	80	44	2	108
\fBfd\fP\fIn\fP\fBu3840\fP	3840K	80	48	2	112
.TE
.\"}}}
.\"}}}
.\"{{{  Description
.SH DESCRIPTION
\fBfd\fP special files access the floppy disk drives in raw mode.
The following
.IR ioctl (2)
calls are supported by \fBfd\fP devices:
.\"{{{  FDCLRPRM
.IP \fBFDCLRPRM\fP
clears the media information of a drive (geometry of disk in drive).
.\"}}}
.\"{{{  FDCLRPRM
.IP \fBFDSETPRM\fP
sets the media information of a drive. The media information will be
lost when the media is changed.
.\"}}}
.IP \fBFDDEFPRM\fP
sets the media information of a drive (geometry of disk in drive). The
media information will not be lost when the media is changed. This
will disable autodetection. In order to re-enable autodetection, you
have to issue an \fBFDCLRPRM\fP .
.\"}}}
.\"{{{  FDGETDRVTYP
.IP \fBFDGETDRVTYP\fP
returns the type of a drive (name parameter).  For formats which work
in several drive types, \fBFDGETDRVTYP\fP returns a name which is
appropriate for the oldest drive type which supports this format.
.\"}}}
.\"{{{  FDFLUSH
.IP \fBFDFLUSH\fP
invalidates the buffer cache for the given drive.
.\"}}}
.\"{{{  FDSETMAXERRS
.IP \fBFDSETMAXERRS\fP
sets the error thresholds for reporting errors, aborting the operation,
recalibrating, resetting, and reading sector by sector.
.\"}}}
.\"{{{  FDGETMAXERRS
.IP \fBFDSETMAXERRS\fP
gets the current error thresholds.
.\"}}}
.\"{{{  FDGETDRVTYP
.IP \fBFDGETDRVTYP\fP
gets the internal name of the drive.
.\"}}}
.\"{{{  FDWERRORCLR
.IP \fBFDWERRORCLR\fP
clears the write error statistics.
.\"}}}
.\"{{{  FDWERRORGET
.IP \fBFDWERRORGET\fP
reads the write error statistics. These include the total number of
write errors, the location and disk of the first write error, and the
location and disk of the last write error. Disks are identified by a
generation number which is incremented at (almost) each disk change.
.\"}}}
.\"{{{  FDTWADDLE
.IP \fBFDTWADDLE\fP
Switch the drive motor off for a few microseconds. This might be
needed in order to access a disk whose sectors are too close together.
.\"}}}
.\"{{{  FDSETDRVPRM
.IP \fBFDSETDRVPRM\fP
sets various drive parameters.
.\"}}}
.\"{{{  FDGETDRVPRM
.IP \fBFDGETDRVPRM\fP
reads these parameters back.
.\"}}}
.\"{{{  FDGETDRVSTAT
.IP \fBFDGETDRVSTAT\fP
gets the cached drive state (disk changed, write protected et al.)
.\"}}}
.\"{{{  FDPOLLDRVSTAT
.IP \fBFDPOLLDRVSTAT\fP
polls the drive and return its state.
.\"}}}
.\"{{{  FDGETFDCSTAT
.IP \fBFDGETFDCSTAT\fP
gets the floppy controller state.
.\"}}}
.\"{{{  FDRESET
.IP \fBFDRESET\fP
resets the floppy controller under certain conditions.
.\"}}}
.\"{{{  FDRAWCMD
.IP \fBFDRAWCMD\fP
sends a raw command to the floppy controller.
.\"}}}
.PP
For more precise information, consult also the <linux/fd.h> and
<linux/fdreg.h> include files, as well as the manual page for
floppycontrol.
.\"}}}
.\"{{{  Notes
.SH NOTES
The various formats allow one to read and write many types of disks.
However, if a floppy is formatted with a too small inter sector gap,
performance may drop, up to needing a few seconds to access an entire
track. To prevent this, use interleaved formats. It is not possible to
read floppies which are formatted using GCR (group code recording),
which is used by Apple II and Macintosh computers (800k disks).
Reading floppies which are hard sectored (one hole per sector, with
the index hole being a little skewed) is not supported.  This used to
be common with older 8 inch floppies.
.\"}}}
.\"{{{  Files
.SH FILES
/dev/fd*
.\"}}}
.\"{{{  Authors
.SH AUTHORS
Alain Knaff (Alain@linux.lu), David Niemi
(niemidc@tux.org), Bill Broadhurst (bbroad@netcom.com).
.\"}}}
.\"{{{  See also
.SH "SEE ALSO"
.BR floppycontrol (1),
.BR mknod (1),
.BR chown (1),
.BR getfdprm (1),
.BR superformat (1),
.BR mount (8),
.BR setfdprm (1)
.\"}}}