1FD(4) Linux Programmer's Manual FD(4)
2
3
4
6 fd - floppy disk device
7
9 Floppy drives are block devices with major number 2. Typically they
10 are owned by root:floppy (i.e., user root, group floppy) and have ei‐
11 ther mode 0660 (access checking via group membership) or mode 0666 (ev‐
12 erybody has access). The minor numbers encode the device type, drive
13 number, and controller number. For each device type (that is, combina‐
14 tion of density and track count) there is a base minor number. To this
15 base number, add the drive's number on its controller and 128 if the
16 drive is on the secondary controller. In the following device tables,
17 n represents the drive number.
18
19 Warning: if you use formats with more tracks than supported by your
20 drive, you may cause it mechanical damage. Trying once if more tracks
21 than the usual 40/80 are supported should not damage it, but no war‐
22 ranty is given for that. If you are not sure, don't create device en‐
23 tries for those formats, so as to prevent their usage.
24
25 Drive-independent device files which automatically detect the media
26 format and capacity:
27
28 Name Base
29 minor #
30 ───────────────
31 fdn 0
32
33 5.25 inch double-density device files:
34
35 Name Capacity Cyl. Sect. Heads Base
36 KiB minor #
37 ───────────────────────────────────────────────────────
38 fdnd360 360 40 9 2 4
39
40 5.25 inch high-density device files:
41
42 Name Capacity Cyl. Sect. Heads Base
43 KiB minor #
44 ───────────────────────────────────────────────────────
45 fdnh360 360 40 9 2 20
46 fdnh410 410 41 10 2 48
47 fdnh420 420 42 10 2 64
48 fdnh720 720 80 9 2 24
49 fdnh880 880 80 11 2 80
50 fdnh1200 1200 80 15 2 8
51 fdnh1440 1440 80 18 2 40
52 fdnh1476 1476 82 18 2 56
53 fdnh1494 1494 83 18 2 72
54 fdnh1600 1600 80 20 2 92
55
56 3.5 inch double-density device files:
57
58 Name Capacity Cyl. Sect. Heads Base
59 KiB minor #
60 ───────────────────────────────────────────────────────
61 fdnu360 360 80 9 1 12
62 fdnu720 720 80 9 2 16
63 fdnu800 800 80 10 2 120
64 fdnu1040 1040 80 13 2 84
65 fdnu1120 1120 80 14 2 88
66
67 3.5 inch high-density device files:
68
69 Name Capacity Cyl. Sect. Heads Base
70 KiB minor #
71 ───────────────────────────────────────────────────────
72 fdnu360 360 40 9 2 12
73 fdnu720 720 80 9 2 16
74 fdnu820 820 82 10 2 52
75 fdnu830 830 83 10 2 68
76 fdnu1440 1440 80 18 2 28
77 fdnu1600 1600 80 20 2 124
78 fdnu1680 1680 80 21 2 44
79 fdnu1722 1722 82 21 2 60
80 fdnu1743 1743 83 21 2 76
81 fdnu1760 1760 80 22 2 96
82 fdnu1840 1840 80 23 2 116
83 fdnu1920 1920 80 24 2 100
84
85 3.5 inch extra-density device files:
86
87 Name Capacity Cyl. Sect. Heads Base
88 KiB minor #
89 ───────────────────────────────────────────────────────
90 fdnu2880 2880 80 36 2 32
91 fdnCompaQ 2880 80 36 2 36
92 fdnu3200 3200 80 40 2 104
93 fdnu3520 3520 80 44 2 108
94 fdnu3840 3840 80 48 2 112
95
97 fd special files access the floppy disk drives in raw mode. The fol‐
98 lowing ioctl(2) calls are supported by fd devices:
99
100 FDCLRPRM
101 clears the media information of a drive (geometry of disk in
102 drive).
103
104 FDSETPRM
105 sets the media information of a drive. The media information
106 will be lost when the media is changed.
107
108 FDDEFPRM
109 sets the media information of a drive (geometry of disk in
110 drive). The media information will not be lost when the media
111 is changed. This will disable autodetection. In order to reen‐
112 able autodetection, you have to issue an FDCLRPRM.
113
114 FDGETDRVTYP
115 returns the type of a drive (name parameter). For formats which
116 work in several drive types, FDGETDRVTYP returns a name which is
117 appropriate for the oldest drive type which supports this for‐
118 mat.
119
120 FDFLUSH
121 invalidates the buffer cache for the given drive.
122
123 FDSETMAXERRS
124 sets the error thresholds for reporting errors, aborting the op‐
125 eration, recalibrating, resetting, and reading sector by sector.
126
127 FDSETMAXERRS
128 gets the current error thresholds.
129
130 FDGETDRVTYP
131 gets the internal name of the drive.
132
133 FDWERRORCLR
134 clears the write error statistics.
135
136 FDWERRORGET
137 reads the write error statistics. These include the total num‐
138 ber of write errors, the location and disk of the first write
139 error, and the location and disk of the last write error. Disks
140 are identified by a generation number which is incremented at
141 (almost) each disk change.
142
143 FDTWADDLE
144 Switch the drive motor off for a few microseconds. This might
145 be needed in order to access a disk whose sectors are too close
146 together.
147
148 FDSETDRVPRM
149 sets various drive parameters.
150
151 FDGETDRVPRM
152 reads these parameters back.
153
154 FDGETDRVSTAT
155 gets the cached drive state (disk changed, write protected et
156 al.)
157
158 FDPOLLDRVSTAT
159 polls the drive and return its state.
160
161 FDGETFDCSTAT
162 gets the floppy controller state.
163
164 FDRESET
165 resets the floppy controller under certain conditions.
166
167 FDRAWCMD
168 sends a raw command to the floppy controller.
169
170 For more precise information, consult also the <linux/fd.h> and
171 <linux/fdreg.h> include files, as well as the floppycontrol(1) manual
172 page.
173
175 /dev/fd*
176
178 The various formats permit reading and writing many types of disks.
179 However, if a floppy is formatted with an inter-sector gap that is too
180 small, performance may drop, to the point of needing a few seconds to
181 access an entire track. To prevent this, use interleaved formats.
182
183 It is not possible to read floppies which are formatted using GCR
184 (group code recording), which is used by Apple II and Macintosh comput‐
185 ers (800k disks).
186
187 Reading floppies which are hard sectored (one hole per sector, with the
188 index hole being a little skewed) is not supported. This used to be
189 common with older 8-inch floppies.
190
192 chown(1), floppycontrol(1), getfdprm(1), mknod(1), superformat(1),
193 mount(8), setfdprm(8)
194
196 This page is part of release 5.10 of the Linux man-pages project. A
197 description of the project, information about reporting bugs, and the
198 latest version of this page, can be found at
199 https://www.kernel.org/doc/man-pages/.
200
201
202
203Linux 2020-08-13 FD(4)