Main index | Section 1 | 日本語 | Options |
The fdread utility will always read an entire floppy medium, and write its contents to the respective output file. Unlike other tools like dd(1), fdread automatically uses a read block size that is more efficient than reading single blocks (usually one track of data at a time), but falls back to reading single floppy sectors in case of an input/output error occurred, in order to obtain as much valid data as possible. While fdread is working, kernel error reporting for floppy errors is turned off, so the console and/or syslog are not flooded with kernel error messages.
The fdread utility accepts the following options:
| |
Turn on quiet mode. By default, the medium parameters of the device are being written to standard error output, progress will be indicated by the approximate number of kilobytes read so far, and errors will be printed out in detail, including the information about the location of recovered data in the output. In quiet mode, none of these messages will be generated. | |
| |
Enable error recovery.
By default,
fdread
stops after the first unrecovered read error, much like
dd(1)
does.
In recovery mode, however, one of two recovery actions will be
taken:
Unless operating in quiet mode, the action taken and the location of the error in the output file will be displayed. | |
| |
Specify the input floppy device, defaulting to /dev/fd0. The parameter device must be a valid floppy disk device. | |
| |
Value of the fill byte used for dummy blocks in the output file in recovery mode. Defaults to ‘0xf0’. (Mnemonic: "foo.") The value can be specified using the usual C language notation of the number base. | |
| |
Specify the output file to be file. By default, the data will be written to standard output. | |
| |
Read
numsects
sector ID fields, and write out their contents to standard output.
Each sector ID field contains recorded values for the cylinder number
(‘C’),
the head number
(‘H’),
the record number (sector number starting with 1)
(‘R’),
and the
sector shift value
(0 = 128 bytes, 1 = 256 bytes, 2 = 512 bytes, 3 = 1024 bytes)
(‘N’).
The
| |
| |
Specify the track number (cylinder number * number of heads + head
number) to read the sector ID fields from; only allowed together with
the
| |
/dev/fd0 | |
Default device to read from. | |
The FDC error status includes the three FDC status registers ‘ST0’, ‘ST1’, and ‘ST2’, as well as the location of the error (physical cylinder, head, and sector number, plus the "sector shift value", respectively). See the manual for the NE765 or compatible for details about the status register contents.
The FDC's status is then examined to determine whether the error is deemed to be recoverable. If error recovery was requested, the location of the bad block in the output file is indicated by its (hexadecimal) bounds. Also, a summary line indicating the total number of transfer errors will be printed before exiting.
The command appeared in FreeBSD 5.0 .
No attempt beyond the floppy error retry mechanism of fdc(4) is made in order to see whether bad sectors could still be read without errors by trying multiple times.
Bits that are (no longer) available on the floppy medium cannot be guessed by fdread.
FDREAD (1) | May 14, 2001 |
Main index | Section 1 | 日本語 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
“ | If at first you don't succeed, you must be a programmer. | ” |