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