OSDN Git Service

(split) LDP: Update original to LDP v3.50.
[linuxjm/LDP_man-pages.git] / original / 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 2010-08-29 "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 3.5 inch double density device files:
90 .TS
91 lw(1i) l l l l l.
92 Name    Capac.  Cyl.    Sect.   Heads   Base minor #
93 _
94 \fBfd\fP\fIn\fP\fBD360\fP       360K    80      9       1       12
95 \fBfd\fP\fIn\fP\fBD720\fP       720K    80      9       2       16
96 \fBfd\fP\fIn\fP\fBD800\fP       800K    80      10      2       120
97 \fBfd\fP\fIn\fP\fBD1040\fP      1040K   80      13      2       84
98 \fBfd\fP\fIn\fP\fBD1120\fP      1120K   80      14      2       88
99 .TE
100 .PP
101 3.5 inch high density device files:
102 .TS
103 lw(1i) l l l l l.
104 Name    Capac.  Cyl.    Sect.   Heads   Base minor #
105 _
106 \fBfd\fP\fIn\fP\fBH360\fP       360K    40      9       2       12
107 \fBfd\fP\fIn\fP\fBH720\fP       720K    80      9       2       16
108 \fBfd\fP\fIn\fP\fBH820\fP       820K    82      10      2       52
109 \fBfd\fP\fIn\fP\fBH830\fP       830K    83      10      2       68
110 \fBfd\fP\fIn\fP\fBH1440\fP      1440K   80      18      2       28
111 \fBfd\fP\fIn\fP\fBH1600\fP      1600K   80      20      2       124
112 \fBfd\fP\fIn\fP\fBH1680\fP      1680K   80      21      2       44
113 \fBfd\fP\fIn\fP\fBH1722\fP      1722K   82      21      2       60
114 \fBfd\fP\fIn\fP\fBH1743\fP      1743K   83      21      2       76
115 \fBfd\fP\fIn\fP\fBH1760\fP      1760K   80      22      2       96
116 \fBfd\fP\fIn\fP\fBH1840\fP      1840K   80      23      2       116
117 \fBfd\fP\fIn\fP\fBH1920\fP      1920K   80      24      2       100
118 .TE
119 .PP
120 3.5 inch extra density device files:
121 .TS
122 lw(1i) l l l l l.
123 Name    Capac.  Cyl.    Sect.   Heads   Base minor #
124 _
125 \fBfd\fP\fIn\fP\fBE2880\fP      2880K   80      36      2       32
126 \fBfd\fP\fIn\fP\fBCompaQ\fP     2880K   80      36      2       36
127 \fBfd\fP\fIn\fP\fBE3200\fP      3200K   80      40      2       104
128 \fBfd\fP\fIn\fP\fBE3520\fP      3520K   80      44      2       108
129 \fBfd\fP\fIn\fP\fBE3840\fP      3840K   80      48      2       112
130 .TE
131 .SH DESCRIPTION
132 \fBfd\fP special files access the floppy disk drives in raw mode.
133 The following
134 .BR ioctl (2)
135 calls are supported by \fBfd\fP devices:
136 .IP \fBFDCLRPRM\fP
137 clears the media information of a drive (geometry of disk in drive).
138 .IP \fBFDSETPRM\fP
139 sets the media information of a drive.
140 The media information will be
141 lost when the media is changed.
142 .IP \fBFDDEFPRM\fP
143 sets the media information of a drive (geometry of disk in drive).
144 The media information will not be lost when the media is changed.
145 This will disable autodetection.
146 In order to reenable autodetection, you
147 have to issue an \fBFDCLRPRM\fP.
148 .IP \fBFDGETDRVTYP\fP
149 returns the type of a drive (name parameter).
150 For formats which work
151 in several drive types, \fBFDGETDRVTYP\fP returns a name which is
152 appropriate for the oldest drive type which supports this format.
153 .IP \fBFDFLUSH\fP
154 invalidates the buffer cache for the given drive.
155 .IP \fBFDSETMAXERRS\fP
156 sets the error thresholds for reporting errors, aborting the operation,
157 recalibrating, resetting, and reading sector by sector.
158 .IP \fBFDSETMAXERRS\fP
159 gets the current error thresholds.
160 .IP \fBFDGETDRVTYP\fP
161 gets the internal name of the drive.
162 .IP \fBFDWERRORCLR\fP
163 clears the write error statistics.
164 .IP \fBFDWERRORGET\fP
165 reads the write error statistics.
166 These include the total number of
167 write errors, the location and disk of the first write error, and the
168 location and disk of the last write error.
169 Disks are identified by a
170 generation number which is incremented at (almost) each disk change.
171 .IP \fBFDTWADDLE\fP
172 Switch the drive motor off for a few microseconds.
173 This might be
174 needed in order to access a disk whose sectors are too close together.
175 .IP \fBFDSETDRVPRM\fP
176 sets various drive parameters.
177 .IP \fBFDGETDRVPRM\fP
178 reads these parameters back.
179 .IP \fBFDGETDRVSTAT\fP
180 gets the cached drive state (disk changed, write protected et al.)
181 .IP \fBFDPOLLDRVSTAT\fP
182 polls the drive and return its state.
183 .IP \fBFDGETFDCSTAT\fP
184 gets the floppy controller state.
185 .IP \fBFDRESET\fP
186 resets the floppy controller under certain conditions.
187 .IP \fBFDRAWCMD\fP
188 sends a raw command to the floppy controller.
189 .PP
190 For more precise information, consult also the \fI<linux/fd.h>\fP and
191 \fI<linux/fdreg.h>\fP include files, as well as the
192 .BR floppycontrol (1)
193 manual page.
194 .SH FILES
195 /dev/fd*
196 .SH NOTES
197 The various formats permit reading and writing many types of disks.
198 However, if a floppy is formatted with an inter-sector gap that is too small,
199 performance may drop,
200 to the point of needing a few seconds to access an entire track.
201 To prevent this, use interleaved formats.
202
203 It is not possible to
204 read floppies which are formatted using GCR (group code recording),
205 which is used by Apple II and Macintosh computers (800k disks).
206
207 Reading floppies which are hard sectored (one hole per sector, with
208 the index hole being a little skewed) is not supported.
209 This used to be common with older 8-inch floppies.
210 .\" .SH AUTHORS
211 .\" Alain Knaff (Alain.Knaff@imag.fr), David Niemi
212 .\" (niemidc@clark.net), Bill Broadhurst (bbroad@netcom.com).
213 .SH SEE ALSO
214 .BR chown (1),
215 .BR floppycontrol (1),
216 .BR getfdprm (1),
217 .BR mknod (1),
218 .BR superformat (1),
219 .BR mount (8),
220 .BR setfdprm (8)