2 .\" Copyright (c) 2001 Joerg Wunsch
4 .\" All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
15 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
48 utility reads floppy disks.
49 Effective read blocking based on the track
50 size is performed, and floppy-specific error recovery of otherwise
51 bad blocks can be enabled.
56 will always read an entire floppy medium, and write its contents to
57 the respective output file.
58 Unlike other tools like
61 automatically uses a read block size that is more efficient than
62 reading single blocks (usually one track of data at a time), but
63 falls back to reading single floppy sectors in case of an input/output
64 error occurred, in order to obtain as much valid data as possible.
67 is working, kernel error reporting for floppy errors is turned off, so
68 the console and/or syslog are not flooded with kernel error messages.
72 utility accepts the following options:
73 .Bl -tag -width indent
76 By default, the medium parameters of the device
77 are being written to standard error output, progress will be indicated
78 by the approximate number of kilobytes read so far, and errors will be
79 printed out in detail, including the information about the location of
80 recovered data in the output.
81 In quiet mode, none of these messages
84 Enable error recovery.
87 stops after the first unrecovered read error, much like
90 In recovery mode, however, one of two recovery actions will be
94 If the error was a CRC error in the data field, the
95 kernel is told to ignore the error, and data are transferred to the
98 Note that this will cause the erroneous data
99 to be included in the output file!
101 Still, this is the best recovery action that can be taken at all.
103 All other errors are really fatal (usually, the FDC did not find the
104 sector ID fields), thus a dummy block with fill
105 bytes will be included in the output file.
108 Unless operating in quiet mode, the action taken and the location of
109 the error in the output file will be displayed.
111 Specify the input floppy device, defaulting to
115 must be a valid floppy disk device.
117 Value of the fill byte used for dummy blocks in the output file in
123 The value can be specified using the usual C language notation of
126 Specify the output file to be
128 By default, the data will be written to standard output.
132 sector ID fields, and write out their contents to standard output.
133 Each sector ID field contains recorded values for the cylinder number
137 the record number (sector number starting with 1)
140 .Em sector shift value
141 (0 = 128 bytes, 1 = 256 bytes, 2 = 512 bytes, 3 = 1024 bytes)
145 option is mutually exclusive with all other options except
150 Specify the track number (cylinder number * number of heads + head
151 number) to read the sector ID fields from; only allowed together with
157 .Bl -tag -width /dev/fd0
159 Default device to read from.
164 utility sets the exit value according to
166 In recovery mode, the exit value will be set to
168 if any error occurred during processing (even in quiet mode).
170 Unless running in quiet mode, upon encountering an error, the status
171 of the floppy disc controller (FDC) will be printed out, both in
172 hexadecimal form, followed by a textual description that translates
173 those values into a human-readable form for the most common error
174 cases that can happen in a PC environment.
176 The FDC error status includes the three FDC status registers
181 as well as the location of the error (physical cylinder, head, and sector
183 .Dq sector shift value ,
185 See the manual for the NE765 or compatible for details
186 about the status register contents.
188 The FDC's status is then examined to determine whether the error is
189 deemed to be recoverable.
190 If error recovery was requested, the
191 location of the bad block in the output file is indicated by its
192 (hexadecimal) bounds.
193 Also, a summary line indicating the total number
194 of transfer errors will be printed before exiting.
204 utility was written mainly to provide a means of recovering at least some of
205 the data on bad media, and to obviate the need to invoke
207 with too many hard to memorize options that might be useful to handle
210 The command appeared in
213 Program and man page by
216 Concurrent traffic on the second floppy drive located at the same FDC
217 will make error recovery attempts pointless, since the FDC status
218 obtained after a read error occurred cannot be guaranteed to actually
219 belong to the erroneous transfer.
224 is the only active drive on that controller.
226 No attempt beyond the floppy error retry mechanism of
228 is made in order to see whether bad sectors could still be read
229 without errors by trying multiple times.
231 Bits that are (no longer) available on the floppy medium cannot be