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 minor #
29       ────────────────────
30       fdn    0
31
32       5.25 inch double density device files:
33
34       Name         Capac.   Cyl.   Sect.   Heads   Base minor #
35       ──────────────────────────────────────────────────────────
36       fdnd360      360K     40     9       2       4
37
38       5.25 inch high density device files:
39
40       Name         Capac.   Cyl.   Sect.   Heads   Base minor #
41       ──────────────────────────────────────────────────────────
42       fdnh360      360K     40     9       2       20
43       fdnh410      410K     41     10      2       48
44       fdnh420      420K     42     10      2       64
45       fdnh720      720K     80     9       2       24
46       fdnh880      880K     80     11      2       80
47       fdnh1200     1200K    80     15      2       8
48       fdnh1440     1440K    80     18      2       40
49       fdnh1476     1476K    82     18      2       56
50       fdnh1494     1494K    83     18      2       72
51       fdnh1600     1600K    80     20      2       92
52       3.5 inch double density device files:
53
54       Name         Capac.   Cyl.   Sect.   Heads   Base minor #
55       ──────────────────────────────────────────────────────────
56       fdnD360      360K     80     9       1       12
57       fdnD720      720K     80     9       2       16
58       fdnD800      800K     80     10      2       120
59       fdnD1040     1040K    80     13      2       84
60       fdnD1120     1120K    80     14      2       88
61
62       3.5 inch high density device files:
63
64       Name         Capac.   Cyl.   Sect.   Heads   Base minor #
65       ──────────────────────────────────────────────────────────
66
67       fdnH360      360K     40     9       2       12
68       fdnH720      720K     80     9       2       16
69       fdnH820      820K     82     10      2       52
70       fdnH830      830K     83     10      2       68
71       fdnH1440     1440K    80     18      2       28
72       fdnH1600     1600K    80     20      2       124
73       fdnH1680     1680K    80     21      2       44
74       fdnH1722     1722K    82     21      2       60
75       fdnH1743     1743K    83     21      2       76
76       fdnH1760     1760K    80     22      2       96
77       fdnH1840     1840K    80     23      2       116
78       fdnH1920     1920K    80     24      2       100
79
80       3.5 inch extra density device files:
81
82       Name         Capac.   Cyl.   Sect.   Heads   Base minor #
83       ──────────────────────────────────────────────────────────
84       fdnE2880     2880K    80     36      2       32
85       fdnCompaQ    2880K    80     36      2       36
86       fdnE3200     3200K    80     40      2       104
87       fdnE3520     3520K    80     44      2       108
88       fdnE3840     3840K    80     48      2       112
89

DESCRIPTION

91       fd special files access the floppy disk drives in raw mode.   The  fol‐
92       lowing ioctl(2) calls are supported by fd devices:
93
94       FDCLRPRM
95              clears  the  media  information  of a drive (geometry of disk in
96              drive).
97
98       FDSETPRM
99              sets the media information of a drive.   The  media  information
100              will be lost when the media is changed.
101
102       FDDEFPRM
103              sets  the  media  information  of  a  drive (geometry of disk in
104              drive).  The media information will not be lost when  the  media
105              is changed.  This will disable autodetection.  In order to reen‐
106              able autodetection, you have to issue an FDCLRPRM.
107
108       FDGETDRVTYP
109              returns the type of a drive (name parameter).  For formats which
110              work in several drive types, FDGETDRVTYP returns a name which is
111              appropriate for the oldest drive type which supports  this  for‐
112              mat.
113
114       FDFLUSH
115              invalidates the buffer cache for the given drive.
116
117       FDSETMAXERRS
118              sets  the  error  thresholds  for reporting errors, aborting the
119              operation, recalibrating, resetting, and reading sector by  sec‐
120              tor.
121
122       FDSETMAXERRS
123              gets the current error thresholds.
124
125       FDGETDRVTYP
126              gets the internal name of the drive.
127
128       FDWERRORCLR
129              clears the write error statistics.
130
131       FDWERRORGET
132              reads  the write error statistics.  These include the total num‐
133              ber of write errors, the location and disk of  the  first  write
134              error, and the location and disk of the last write error.  Disks
135              are identified by a generation number which  is  incremented  at
136              (almost) each disk change.
137
138       FDTWADDLE
139              Switch  the  drive motor off for a few microseconds.  This might
140              be needed in order to access a disk whose sectors are too  close
141              together.
142
143       FDSETDRVPRM
144              sets various drive parameters.
145
146       FDGETDRVPRM
147              reads these parameters back.
148
149       FDGETDRVSTAT
150              gets  the  cached  drive state (disk changed, write protected et
151              al.)
152
153       FDPOLLDRVSTAT
154              polls the drive and return its state.
155
156       FDGETFDCSTAT
157              gets the floppy controller state.
158
159       FDRESET
160              resets the floppy controller under certain conditions.
161
162       FDRAWCMD
163              sends a raw command to the floppy controller.
164
165       For  more  precise  information,  consult  also  the  <linux/fd.h>  and
166       <linux/fdreg.h>  include  files, as well as the floppycontrol(1) manual
167       page.
168

FILES

170       /dev/fd*
171

NOTES

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

SEE ALSO

187       chown(1),   floppycontrol(1),  getfdprm(1),  mknod(1),  superformat(1),
188       mount(8), setfdprm(8)
189

COLOPHON

191       This page is part of release 3.53 of the Linux  man-pages  project.   A
192       description  of  the project, and information about reporting bugs, can
193       be found at http://www.kernel.org/doc/man-pages/.
194
195
196
197Linux                             2010-08-29                             FD(4)
Impressum