]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man4/fd.4
getlogin.3: Remove deprecated _REENTRANT from FTM requirements for getlogin_r()
[thirdparty/man-pages.git] / man4 / fd.4
1 '\" t
2 .\" Copyright (c) 1993 Michael Haardt (michael@cantor.informatik.rwth-aachen.de)
3 .\" and 1994,1995 Alain Knaff (Alain.Knaff@imag.fr)
4 .\"
5 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
6 .\" This is free documentation; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License as
8 .\" published by the Free Software Foundation; either version 2 of
9 .\" the License, or (at your option) any later version.
10 .\"
11 .\" The GNU General Public License's references to "object code"
12 .\" and "executables" are to be interpreted as the output of any
13 .\" document formatting or typesetting system, including
14 .\" intermediate and printed output.
15 .\"
16 .\" This manual is distributed in the hope that it will be useful,
17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 .\" GNU General Public License for more details.
20 .\"
21 .\" You should have received a copy of the GNU General Public
22 .\" License along with this manual; if not, see
23 .\" <http://www.gnu.org/licenses/>.
24 .\" %%%LICENSE_END
25 .\"
26 .\" Modified, Sun Feb 26 15:00:02 1995, faith@cs.unc.edu
27 .\"
28 .TH FD 4 2014-05-10 "Linux" "Linux Programmer's Manual"
29 .SH NAME
30 fd \- floppy disk device
31 .SH CONFIGURATION
32 Floppy drives are block devices with major number 2.
33 Typically they
34 are owned by
35 .I root.floppy
36 (i.e., user root, group floppy) and have
37 either mode 0660 (access checking via group membership) or mode 0666
38 (everybody has access).
39 The minor
40 numbers encode the device type, drive number, and controller number.
41 For each device type (that is, combination of density and track count)
42 there is a base minor number.
43 To this base number, add the drive's
44 number on its controller and 128 if the drive is on the secondary
45 controller.
46 In the following device tables, \fIn\fP represents the
47 drive number.
48 .PP
49 \fBWarning: if you use formats with more tracks
50 than supported by your drive, you may cause it mechanical damage.\fP
51 Trying once if more tracks than the usual 40/80 are supported should not
52 damage it, but no warranty is given for that.
53 If you are not sure, don't create device
54 entries for those formats, so as to prevent their usage.
55 .PP
56 Drive-independent device files which automatically detect the media
57 format and capacity:
58 .TS
59 l l.
60 Name Base minor #
61 _
62 \fBfd\fP\fIn\fP 0
63 .TE
64 .PP
65 5.25 inch double-density device files:
66 .TS
67 lw(1i) l l l l l.
68 Name Capac. Cyl. Sect. Heads Base minor #
69 _
70 \fBfd\fP\fIn\fP\fBd360\fP 360K 40 9 2 4
71 .TE
72 .PP
73 5.25 inch high-density device files:
74 .TS
75 lw(1i) l l l l l.
76 Name Capac. Cyl. Sect. Heads Base minor #
77 _
78 \fBfd\fP\fIn\fP\fBh360\fP 360K 40 9 2 20
79 \fBfd\fP\fIn\fP\fBh410\fP 410K 41 10 2 48
80 \fBfd\fP\fIn\fP\fBh420\fP 420K 42 10 2 64
81 \fBfd\fP\fIn\fP\fBh720\fP 720K 80 9 2 24
82 \fBfd\fP\fIn\fP\fBh880\fP 880K 80 11 2 80
83 \fBfd\fP\fIn\fP\fBh1200\fP 1200K 80 15 2 8
84 \fBfd\fP\fIn\fP\fBh1440\fP 1440K 80 18 2 40
85 \fBfd\fP\fIn\fP\fBh1476\fP 1476K 82 18 2 56
86 \fBfd\fP\fIn\fP\fBh1494\fP 1494K 83 18 2 72
87 \fBfd\fP\fIn\fP\fBh1600\fP 1600K 80 20 2 92
88 .TE
89 .PP
90 3.5 inch double-density device files:
91 .TS
92 lw(1i) l l l l l.
93 Name Capac. Cyl. Sect. Heads Base minor #
94 _
95 \fBfd\fP\fIn\fP\fBu360\fP 360K 80 9 1 12
96 \fBfd\fP\fIn\fP\fBu720\fP 720K 80 9 2 16
97 \fBfd\fP\fIn\fP\fBu800\fP 800K 80 10 2 120
98 \fBfd\fP\fIn\fP\fBu1040\fP 1040K 80 13 2 84
99 \fBfd\fP\fIn\fP\fBu1120\fP 1120K 80 14 2 88
100 .TE
101 .PP
102 3.5 inch high-density device files:
103 .TS
104 lw(1i) l l l l l.
105 Name Capac. Cyl. Sect. Heads Base minor #
106 _
107 \fBfd\fP\fIn\fP\fBu360\fP 360K 40 9 2 12
108 \fBfd\fP\fIn\fP\fBu720\fP 720K 80 9 2 16
109 \fBfd\fP\fIn\fP\fBu820\fP 820K 82 10 2 52
110 \fBfd\fP\fIn\fP\fBu830\fP 830K 83 10 2 68
111 \fBfd\fP\fIn\fP\fBu1440\fP 1440K 80 18 2 28
112 \fBfd\fP\fIn\fP\fBu1600\fP 1600K 80 20 2 124
113 \fBfd\fP\fIn\fP\fBu1680\fP 1680K 80 21 2 44
114 \fBfd\fP\fIn\fP\fBu1722\fP 1722K 82 21 2 60
115 \fBfd\fP\fIn\fP\fBu1743\fP 1743K 83 21 2 76
116 \fBfd\fP\fIn\fP\fBu1760\fP 1760K 80 22 2 96
117 \fBfd\fP\fIn\fP\fBu1840\fP 1840K 80 23 2 116
118 \fBfd\fP\fIn\fP\fBu1920\fP 1920K 80 24 2 100
119 .TE
120 .PP
121 3.5 inch extra-density device files:
122 .TS
123 lw(1i) l l l l l.
124 Name Capac. Cyl. Sect. Heads Base minor #
125 _
126 \fBfd\fP\fIn\fP\fBu2880\fP 2880K 80 36 2 32
127 \fBfd\fP\fIn\fP\fBCompaQ\fP 2880K 80 36 2 36
128 \fBfd\fP\fIn\fP\fBu3200\fP 3200K 80 40 2 104
129 \fBfd\fP\fIn\fP\fBu3520\fP 3520K 80 44 2 108
130 \fBfd\fP\fIn\fP\fBu3840\fP 3840K 80 48 2 112
131 .TE
132 .SH DESCRIPTION
133 \fBfd\fP special files access the floppy disk drives in raw mode.
134 The following
135 .BR ioctl (2)
136 calls are supported by \fBfd\fP devices:
137 .IP \fBFDCLRPRM\fP
138 clears the media information of a drive (geometry of disk in drive).
139 .IP \fBFDSETPRM\fP
140 sets the media information of a drive.
141 The media information will be
142 lost when the media is changed.
143 .IP \fBFDDEFPRM\fP
144 sets the media information of a drive (geometry of disk in drive).
145 The media information will not be lost when the media is changed.
146 This will disable autodetection.
147 In order to reenable autodetection, you
148 have to issue an \fBFDCLRPRM\fP.
149 .IP \fBFDGETDRVTYP\fP
150 returns the type of a drive (name parameter).
151 For formats which work
152 in several drive types, \fBFDGETDRVTYP\fP returns a name which is
153 appropriate for the oldest drive type which supports this format.
154 .IP \fBFDFLUSH\fP
155 invalidates the buffer cache for the given drive.
156 .IP \fBFDSETMAXERRS\fP
157 sets the error thresholds for reporting errors, aborting the operation,
158 recalibrating, resetting, and reading sector by sector.
159 .IP \fBFDSETMAXERRS\fP
160 gets the current error thresholds.
161 .IP \fBFDGETDRVTYP\fP
162 gets the internal name of the drive.
163 .IP \fBFDWERRORCLR\fP
164 clears the write error statistics.
165 .IP \fBFDWERRORGET\fP
166 reads the write error statistics.
167 These include the total number of
168 write errors, the location and disk of the first write error, and the
169 location and disk of the last write error.
170 Disks are identified by a
171 generation number which is incremented at (almost) each disk change.
172 .IP \fBFDTWADDLE\fP
173 Switch the drive motor off for a few microseconds.
174 This might be
175 needed in order to access a disk whose sectors are too close together.
176 .IP \fBFDSETDRVPRM\fP
177 sets various drive parameters.
178 .IP \fBFDGETDRVPRM\fP
179 reads these parameters back.
180 .IP \fBFDGETDRVSTAT\fP
181 gets the cached drive state (disk changed, write protected et al.)
182 .IP \fBFDPOLLDRVSTAT\fP
183 polls the drive and return its state.
184 .IP \fBFDGETFDCSTAT\fP
185 gets the floppy controller state.
186 .IP \fBFDRESET\fP
187 resets the floppy controller under certain conditions.
188 .IP \fBFDRAWCMD\fP
189 sends a raw command to the floppy controller.
190 .PP
191 For more precise information, consult also the \fI<linux/fd.h>\fP and
192 \fI<linux/fdreg.h>\fP include files, as well as the
193 .BR floppycontrol (1)
194 manual page.
195 .SH FILES
196 /dev/fd*
197 .SH NOTES
198 The various formats permit reading and writing many types of disks.
199 However, if a floppy is formatted with an inter-sector gap that is too small,
200 performance may drop,
201 to the point of needing a few seconds to access an entire track.
202 To prevent this, use interleaved formats.
203
204 It is not possible to
205 read floppies which are formatted using GCR (group code recording),
206 which is used by Apple II and Macintosh computers (800k disks).
207
208 Reading floppies which are hard sectored (one hole per sector, with
209 the index hole being a little skewed) is not supported.
210 This used to be common with older 8-inch floppies.
211 .\" .SH AUTHORS
212 .\" Alain Knaff (Alain.Knaff@imag.fr), David Niemi
213 .\" (niemidc@clark.net), Bill Broadhurst (bbroad@netcom.com).
214 .SH SEE ALSO
215 .BR chown (1),
216 .BR floppycontrol (1),
217 .BR getfdprm (1),
218 .BR mknod (1),
219 .BR superformat (1),
220 .BR mount (8),
221 .BR setfdprm (8)