The mbadblocks
command is used to mark some clusters on an
MS-DOS filesystem bad. It has the following syntax:
mbadblocks
[-s
sectorlist|-c
clusterlist|-w] drive:
If no command line flags are supplied, Mbadblocks
scans an
MS-DOS filesystem for bad blocks by simply trying to read them and
flag them if read fails. All blocks that are unused are scanned, and
if detected bad are marked as such in the FAT.
This command is intended to be used right after mformat
. It is
not intended to salvage data from bad disks.
c file
Use a list of bad clusters, rather than scanning for bad clusters itself.
s file
Use a list of bad sectors (counted from beginning of filesystem), rather than trying for bad clusters itself.
w
Write a random pattern to each cluster, then read it back and flag cluster as bad if mismatch. Only free clusters are tested in such a way, so any file data is preserved.
Mbadblocks
should (but doesn’t yet :-( ) also try to salvage bad
blocks which are in use by reading them repeatedly, and then mark them
bad.