1FD(4)                      Linux Programmer's Manual                     FD(4)
2
3
4

NAME

6       fd - floppy disk device
7

CONFIGURATION

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
11       either  mode  0660  (access checking via group membership) or mode 0666
12       (everybody has access).  The minor  numbers  encode  the  device  type,
13       drive  number,  and  controller number.  For each device type (that is,
14       combination of density and track count) there is a base  minor  number.
15       To  this  base number, add the drive's number on its controller and 128
16       if the drive is on the secondary controller.  In the  following  device
17       tables, 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
23       entries 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

DESCRIPTION

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
125              operation, recalibrating, resetting, and reading sector by  sec‐
126              tor.
127
128       FDSETMAXERRS
129              gets the current error thresholds.
130
131       FDGETDRVTYP
132              gets the internal name of the drive.
133
134       FDWERRORCLR
135              clears the write error statistics.
136
137       FDWERRORGET
138              reads  the write error statistics.  These include the total num‐
139              ber of write errors, the location and disk of  the  first  write
140              error, and the location and disk of the last write error.  Disks
141              are identified by a generation number which  is  incremented  at
142              (almost) each disk change.
143
144       FDTWADDLE
145              Switch  the  drive motor off for a few microseconds.  This might
146              be needed in order to access a disk whose sectors are too  close
147              together.
148
149       FDSETDRVPRM
150              sets various drive parameters.
151
152       FDGETDRVPRM
153              reads these parameters back.
154
155       FDGETDRVSTAT
156              gets  the  cached  drive state (disk changed, write protected et
157              al.)
158
159       FDPOLLDRVSTAT
160              polls the drive and return its state.
161
162       FDGETFDCSTAT
163              gets the floppy controller state.
164
165       FDRESET
166              resets the floppy controller under certain conditions.
167
168       FDRAWCMD
169              sends a raw command to the floppy controller.
170
171       For  more  precise  information,  consult  also  the  <linux/fd.h>  and
172       <linux/fdreg.h>  include  files, as well as the floppycontrol(1) manual
173       page.
174

FILES

176       /dev/fd*
177

NOTES

179       The various formats permit reading and writing  many  types  of  disks.
180       However,  if a floppy is formatted with an inter-sector gap that is too
181       small, performance may drop, to the point of needing a few  seconds  to
182       access an entire track.  To prevent this, use interleaved formats.
183
184       It  is  not  possible  to  read  floppies which are formatted using GCR
185       (group code recording), which is used by Apple II and Macintosh comput‐
186       ers (800k disks).
187
188       Reading floppies which are hard sectored (one hole per sector, with the
189       index hole being a little skewed) is not supported.  This  used  to  be
190       common with older 8-inch floppies.
191

SEE ALSO

193       chown(1),   floppycontrol(1),  getfdprm(1),  mknod(1),  superformat(1),
194       mount(8), setfdprm(8)
195

COLOPHON

197       This page is part of release 4.15 of the Linux  man-pages  project.   A
198       description  of  the project, information about reporting bugs, and the
199       latest    version    of    this    page,    can     be     found     at
200       https://www.kernel.org/doc/man-pages/.
201
202
203
204Linux                             2014-05-10                             FD(4)
Impressum