OSDN Git Service

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