]>
Commit | Line | Data |
---|---|---|
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 |
30 | fd \- floppy disk device | |
31 | .SH CONFIGURATION | |
c13182ef MK |
32 | Floppy drives are block devices with major number 2. |
33 | Typically they | |
a98b7568 | 34 | are owned by |
6f5b156b | 35 | root:floppy |
a98b7568 | 36 | (i.e., user root, group floppy) and have |
fea681da | 37 | either mode 0660 (access checking via group membership) or mode 0666 |
c13182ef MK |
38 | (everybody has access). |
39 | The minor | |
fea681da MK |
40 | numbers encode the device type, drive number, and controller number. |
41 | For each device type (that is, combination of density and track count) | |
c13182ef MK |
42 | there is a base minor number. |
43 | To this base number, add the drive's | |
fea681da | 44 | number on its controller and 128 if the drive is on the secondary |
c13182ef MK |
45 | controller. |
46 | In the following device tables, \fIn\fP represents the | |
fea681da MK |
47 | drive number. |
48 | .PP | |
f64cc745 | 49 | \fBWarning: if you use formats with more tracks |
c13182ef MK |
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. | |
a98b7568 MK |
53 | If you are not sure, don't create device |
54 | entries for those formats, so as to prevent their usage. | |
fea681da | 55 | .PP |
a98b7568 | 56 | Drive-independent device files which automatically detect the media |
fea681da | 57 | format and capacity: |
fea681da | 58 | .TS |
afb98b84 MK |
59 | l c |
60 | l c. | |
61 | Name Base | |
62 | minor # | |
fea681da MK |
63 | _ |
64 | \fBfd\fP\fIn\fP 0 | |
65 | .TE | |
66 | .PP | |
4d7bd2ae | 67 | 5.25 inch double-density device files: |
fea681da | 68 | .TS |
afb98b84 | 69 | lw(1i) l l l l c |
68cd2713 | 70 | lw(1i) c c c c c. |
afb98b84 MK |
71 | Name 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 | 77 | 5.25 inch high-density device files: |
fea681da | 78 | .TS |
afb98b84 | 79 | lw(1i) l l l l c |
68cd2713 | 80 | lw(1i) c c c c c. |
afb98b84 MK |
81 | Name 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 | 96 | 3.5 inch double-density device files: |
fea681da | 97 | .TS |
afb98b84 | 98 | lw(1i) l l l l c |
68cd2713 | 99 | lw(1i) c c c c c. |
afb98b84 MK |
100 | Name 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 | 110 | 3.5 inch high-density device files: |
fea681da | 111 | .TS |
afb98b84 | 112 | lw(1i) l l l l c |
68cd2713 | 113 | lw(1i) c c c c c. |
afb98b84 MK |
114 | Name 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 | 131 | 3.5 inch extra-density device files: |
fea681da | 132 | .TS |
afb98b84 | 133 | lw(1i) l l l l c |
68cd2713 | 134 | lw(1i) c c c c c. |
afb98b84 MK |
135 | Name 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. | |
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 | |
c13182ef MK |
152 | sets the media information of a drive. |
153 | The media information will be | |
fea681da MK |
154 | lost when the media is changed. |
155 | .IP \fBFDDEFPRM\fP | |
c13182ef MK |
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. | |
3b777aff | 159 | In order to reenable autodetection, you |
8478ee02 | 160 | have to issue an \fBFDCLRPRM\fP. |
fea681da | 161 | .IP \fBFDGETDRVTYP\fP |
c13182ef MK |
162 | returns the type of a drive (name parameter). |
163 | For formats which work | |
fea681da MK |
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 | |
c13182ef MK |
178 | reads the write error statistics. |
179 | These include the total number of | |
fea681da | 180 | write errors, the location and disk of the first write error, and the |
c13182ef MK |
181 | location and disk of the last write error. |
182 | Disks are identified by a | |
fea681da MK |
183 | generation number which is incremented at (almost) each disk change. |
184 | .IP \fBFDTWADDLE\fP | |
c13182ef MK |
185 | Switch the drive motor off for a few microseconds. |
186 | This might be | |
fea681da MK |
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 | |
c84371c6 | 203 | For 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) | |
206 | manual page. | |
2b2581ee | 207 | .SH FILES |
dcaab7a3 | 208 | .I /dev/fd* |
fea681da | 209 | .SH NOTES |
a98b7568 MK |
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. | |
c13182ef | 214 | To prevent this, use interleaved formats. |
2dad4c59 | 215 | .PP |
c13182ef | 216 | It is not possible to |
fea681da MK |
217 | read floppies which are formatted using GCR (group code recording), |
218 | which is used by Apple II and Macintosh computers (800k disks). | |
2dad4c59 | 219 | .PP |
fea681da | 220 | Reading floppies which are hard sectored (one hole per sector, with |
c13182ef | 221 | the index hole being a little skewed) is not supported. |
a98b7568 | 222 | This 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) |