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