2 .\" Copyright (C) 1994, 2001 by Joerg Wunsch, Dresden
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S) ``AS IS'' AND ANY
15 .\" EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
20 .\" OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
21 .\" BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
22 .\" LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
24 .\" USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
34 .Nd display and modify floppy disk parameters
46 utility allows the modification of the run-time behavior of the
48 driver for the device specified by
51 Commands are implemented to query the current device density settings
52 as well as the underlying device hardware as registered with the
53 driver, to manipulate debugging levels, and to adjust the device
55 All the operations that manipulate the kernel
56 settings are restricted to the superuser (by the device driver), while
57 all inquiry requests only require read access to
62 argument should always be given as a full path name, e.g.\&
67 utility without any of the optional flags will report the drive type
68 that has been registered with the device driver.
69 In the shortest form, a single string describing the drive type will
79 This information is primarily intented to be easily parsable by
82 In order to add some descriptive text that makes the output better
83 human readable, the flag
89 will report the device's density settings in a form that is suitable
95 some more text will be returned, including the total capacity of the
96 density settings in kilobytes.
100 driver has been configured with the
102 option, by default, device debugging information is still disabled
103 since it could produce huge amounts of kernel messages.
109 usually immediately before starting an operation on the respective
110 device the debug information is wanted for, and later turned off again
113 Note that debugging levels are a driver's global option that will
114 affect any drives and controllers using the
116 driver, regardless which
118 has been specified on the
124 control utilities support two different options how to specify device
128 to specify the format of the medium in kilobytes.
130 underlying drive type, the value is compared against a table of known
131 commonly used device density settings for that drive, and if a match
132 has been found, those settings will be used.
133 Currently, the following
134 values for the respective drive types are acceptable:
137 2.88M and 1.44M drives:
138 .Bd -ragged -offset indent -compact
142 KB sectrac secsize ncyls speed heads flags
143 1721 21 2 (512) 82 500 2 MFM
144 1476 18 2 (512) 82 500 2 MFM
145 1440 18 2 (512) 80 500 2 MFM
146 1200 15 2 (512) 80 500 2 MFM
147 820 10 2 (512) 82 250 2 MFM
148 800 10 2 (512) 80 250 2 MFM
149 720 9 2 (512) 80 250 2 MFM
154 .Bd -ragged -offset indent -compact
158 KB sectrac secsize ncyls speed heads flags
159 1200 15 2 (512) 80 500 2 MFM
160 1232 8 3 (1024) 77 500 2 MFM
161 1476 18 2 (512) 82 500 2 MFM
162 1440 18 2 (512) 80 500 2 MFM
163 1200 15 2 (512) 80 500 2 MFM
164 820 10 2 (512) 82 300 2 MFM
165 800 10 2 (512) 80 300 2 MFM
166 720 9 2 (512) 80 300 2 MFM
167 360 9 2 (512) 40 300 2 MFM,2STEP
168 640 8 2 (512) 80 300 2 MFM
173 .Bd -ragged -offset indent -compact
177 KB sectrac secsize ncyls speed heads flags
178 720 9 2 (512) 80 250 2 MFM
183 .Bd -ragged -offset indent -compact
187 KB sectrac secsize ncyls speed heads flags
188 360 9 2 (512) 40 250 2 MFM
193 The second form to specify a device density uses
195 to explicitly specify each parameter in detail.
198 is a comma-separated list of values of the form:
201 .Ar sectrac , secsize , datalen , gap , ncyls , speed ,
202 .Ar heads , f_gap , f_inter , offs2 , flags
205 The meaning of the parameters is:
206 .Bl -tag -width ".Ar secsize"
208 The number of sectors per track.
210 The sector size code, 0 = 128 bytes (or less), 1 = 256 bytes, 2 = 512
211 bytes, 3 = 1024 bytes.
213 The actual sector size if the size code is 0, or the (ignored) value
214 0xFF for larger size codes.
216 The length of the gap 3 parameter for read/write operations.
218 The number of cylinders.
220 The transfer speed in kilobytes per second.
221 Can be 250, 300, 500, or
222 1000, but each drive type only supports a subset of these values.
226 The length of the gap 3 when formatting media.
228 The sector interleave to be applied when formatting.
230 interleave, 1 means 1:1 etc.
232 The offset of the sector numbers on side 2 (i.e. head number 1).
233 Normally, sector numbering on both sides starts with 1.
235 A list from one of the following flag values:
237 .Bl -tag -width ".Cm +perpend" -compact
241 Use FM (single-density) encoding.
243 Use 2 steps per each cylinder (for accessing 40-cylinder media in
246 Do not use 2 steps per cylinder, i.e. access each physical cylinder
249 Use perpendicular recording (for 2.88 MB media, currently not
252 Use longitudinal recording.
256 For any missing parameter, the current value will be used, so only
257 actual changes need to be specified.
258 Thus to turn off a flag bit
261 which is the default for all drive types), the form with a leading
262 minus sign must explicitly be used.
264 A simple inquiry about the drive type:
270 Same as above, but with verbose output.
271 Note that the result is about
275 .Em "device density" ,
276 so it is independent from the actual subdevice being used for
279 $ fdcontrol -v /dev/fd1.360
280 /dev/fd1.360: 1.2M drive (5.25" high-density)
282 .\" " <- this one is for Emacs :)
284 Inquiry about the density settings of a particular subdevice.
286 $ fdcontrol -F /dev/fd0.720
287 18,512,0xff,0x1b,80,500,2,0x6c,1,0,+mfm
290 Note that just accessing a new subdevice for the first time will clone
291 this device using the default density settings for the drive type, as
294 Thus, albeit the device name in the example above suggests a 720 KB
295 media density, it has actually been initialized (by the driver) to
297 So, in order to adjust it for standard 720 KB double-density
298 media, one of the following
300 commands needs to be run:
302 # fdcontrol -s 9,,,0x20,,250,,0x50 /dev/fd0.720
303 # fdcontrol -f 720 /dev/fd0.720
306 As indicated, trailing commas in the parameter list may be omitted.
308 In order to access archaic 160 KB single-density (FM encoded) 5.25
309 media in a modern 1.2M drive, something like the following definition
311 (Note that not all controller hardware is actually
312 capable of handling FM encoding at all.)
314 # fdcontrol -s 16,128,0x80,0x2,40,300,,0x10,,,-mfm,+2step /dev/fd1.1
323 and has been vastly overhauled in
326 The program and this man page have been contributed by