]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man4/fd.4
dsp56k.4: ffix
[thirdparty/man-pages.git] / man4 / fd.4
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 .\"
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.
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
22 .\" License along with this manual; if not, see
23 .\" <http://www.gnu.org/licenses/>.
24 .\" %%%LICENSE_END
25 .\"
26 .\" Modified, Sun Feb 26 15:00:02 1995, faith@cs.unc.edu
27 .\"
28 .TH FD 4 2014-05-10 "Linux" "Linux Programmer's Manual"
29 .SH NAME
30 fd \- floppy disk device
31 .SH CONFIGURATION
32 Floppy drives are block devices with major number 2.
33 Typically they
34 are owned by
35 root:floppy
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).
39 The minor
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
45 controller.
46 In the following device tables, \fIn\fP represents the
47 drive number.
48 .PP
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.
55 .PP
56 Drive-independent device files which automatically detect the media
57 format and capacity:
58 .TS
59 l c
60 l c.
61 Name Base
62 minor #
63 _
64 \fBfd\fP\fIn\fP 0
65 .TE
66 .PP
67 5.25 inch double-density device files:
68 .TS
69 lw(1i) l l l l c
70 lw(1i) c c c c c.
71 Name Capacity Cyl. Sect. Heads Base
72 KiB minor #
73 _
74 \fBfd\fP\fIn\fP\fBd360\fP 360 40 9 2 4
75 .TE
76 .PP
77 5.25 inch high-density device files:
78 .TS
79 lw(1i) l l l l c
80 lw(1i) c c c c c.
81 Name Capacity Cyl. Sect. Heads Base
82 KiB minor #
83 _
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
94 .TE
95 .PP
96 3.5 inch double-density device files:
97 .TS
98 lw(1i) l l l l c
99 lw(1i) c c c c c.
100 Name Capacity Cyl. Sect. Heads Base
101 KiB minor #
102 _
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
108 .TE
109 .PP
110 3.5 inch high-density device files:
111 .TS
112 lw(1i) l l l l c
113 lw(1i) c c c c c.
114 Name Capacity Cyl. Sect. Heads Base
115 KiB minor #
116 _
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
129 .TE
130 .PP
131 3.5 inch extra-density device files:
132 .TS
133 lw(1i) l l l l c
134 lw(1i) c c c c c.
135 Name Capacity Cyl. Sect. Heads Base
136 KiB minor #
137 _
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
143 .TE
144 .SH DESCRIPTION
145 \fBfd\fP special files access the floppy disk drives in raw mode.
146 The following
147 .BR ioctl (2)
148 calls are supported by \fBfd\fP devices:
149 .IP \fBFDCLRPRM\fP
150 clears the media information of a drive (geometry of disk in drive).
151 .IP \fBFDSETPRM\fP
152 sets the media information of a drive.
153 The media information will be
154 lost when the media is changed.
155 .IP \fBFDDEFPRM\fP
156 sets the media information of a drive (geometry of disk in drive).
157 The media information will not be lost when the media is changed.
158 This will disable autodetection.
159 In order to reenable autodetection, you
160 have to issue an \fBFDCLRPRM\fP.
161 .IP \fBFDGETDRVTYP\fP
162 returns the type of a drive (name parameter).
163 For formats which work
164 in several drive types, \fBFDGETDRVTYP\fP returns a name which is
165 appropriate for the oldest drive type which supports this format.
166 .IP \fBFDFLUSH\fP
167 invalidates the buffer cache for the given drive.
168 .IP \fBFDSETMAXERRS\fP
169 sets the error thresholds for reporting errors, aborting the operation,
170 recalibrating, resetting, and reading sector by sector.
171 .IP \fBFDSETMAXERRS\fP
172 gets the current error thresholds.
173 .IP \fBFDGETDRVTYP\fP
174 gets the internal name of the drive.
175 .IP \fBFDWERRORCLR\fP
176 clears the write error statistics.
177 .IP \fBFDWERRORGET\fP
178 reads the write error statistics.
179 These include the total number of
180 write errors, the location and disk of the first write error, and the
181 location and disk of the last write error.
182 Disks are identified by a
183 generation number which is incremented at (almost) each disk change.
184 .IP \fBFDTWADDLE\fP
185 Switch the drive motor off for a few microseconds.
186 This might be
187 needed in order to access a disk whose sectors are too close together.
188 .IP \fBFDSETDRVPRM\fP
189 sets various drive parameters.
190 .IP \fBFDGETDRVPRM\fP
191 reads these parameters back.
192 .IP \fBFDGETDRVSTAT\fP
193 gets the cached drive state (disk changed, write protected et al.)
194 .IP \fBFDPOLLDRVSTAT\fP
195 polls the drive and return its state.
196 .IP \fBFDGETFDCSTAT\fP
197 gets the floppy controller state.
198 .IP \fBFDRESET\fP
199 resets the floppy controller under certain conditions.
200 .IP \fBFDRAWCMD\fP
201 sends a raw command to the floppy controller.
202 .PP
203 For more precise information, consult also the \fI<linux/fd.h>\fP and
204 \fI<linux/fdreg.h>\fP include files, as well as the
205 .BR floppycontrol (1)
206 manual page.
207 .SH FILES
208 .I /dev/fd*
209 .SH NOTES
210 The various formats permit reading and writing many types of disks.
211 However, if a floppy is formatted with an inter-sector gap that is too small,
212 performance may drop,
213 to the point of needing a few seconds to access an entire track.
214 To prevent this, use interleaved formats.
215 .PP
216 It is not possible to
217 read floppies which are formatted using GCR (group code recording),
218 which is used by Apple II and Macintosh computers (800k disks).
219 .PP
220 Reading floppies which are hard sectored (one hole per sector, with
221 the index hole being a little skewed) is not supported.
222 This used to be common with older 8-inch floppies.
223 .\" .SH AUTHORS
224 .\" Alain Knaff (Alain.Knaff@imag.fr), David Niemi
225 .\" (niemidc@clark.net), Bill Broadhurst (bbroad@netcom.com).
226 .SH SEE ALSO
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)