2 .TH BADBLOCKS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
4 badblocks \- search a device for bad blocks
38 is used to search for bad blocks on a device (usually a disk partition).
40 is the special file corresponding to the device (e.g
43 is the number of blocks on the device; if it is not specified, the size
44 of the device is used as a default.
45 .I start-block is an optional parameter specifying the starting block number
46 for the test, which allows the testing to start in the middle of the disk.
50 Specify the size of blocks in bytes.
52 .BI \-c " number of blocks"
53 is the number of blocks which are tested at a time. The default is 16.
54 Increasing this number will increase the efficiency of
56 but also will increase its memory usage.
58 needs memory proportional to the number of blocks tested at once, in
59 read-only mode, proportional to twice that number in read-write mode,
60 and proportional to three times that number in non-destructive read-write
61 mode. If you set the number-of-blocks parameter to too high a value,
63 will exit almost immediately with an out-of-memory error "while allocating
64 buffers". If you set it too low, however, for a non-destructive-write-mode
65 test, then it's possble for questionable blocks on an unreliable
66 hard drive to be hidden by the effects of the hard disk track buffer.
69 Normally, badblocks will refuse to do a read/write or a non-destructive
70 test on a device which is mounted, since this can cause the system to
71 potentially crash. This can be overriden using the
73 flag, but this should not be done under normal circumstances. The only time
74 when this option might be safe is if the /etc/mtab file is incorrect, and
75 the device really isn't mounted.
78 Read a list of already existing known bad blocks.
80 will skip testing these blocks since they are known to be bad. If
82 is specified as "-", the list will be read from the standard input.
83 Blocks listed in this list will be omitted from the list of
85 bad blocks produced on the standard output or in the output file.
90 can be used to retrieve the list of blocks currently marked bad on
91 an existing filesystem, in a format suitable for use with this option.
93 .BI \-o " output_file"
94 Write the list of bad blocks to the specified file. Without this option,
96 displays the list on its standard output. The format of this file is suitable
105 .BI \-p " num_passes"
106 Repeat scanning the disk until there are no new blocks discovered in
107 num_passes consecutive scans of the disk.
108 Default is 0, meaning
110 will exit after the first pass.
113 Use non-destructive read-write mode. By default only a non-destructive
114 read-only test is done. This option must not be combined with the
116 option, as they are mutually exclusive.
119 Show the progress of the scan by writing out the block numbers as they
126 Use write-mode test. With this option,
128 scans for bad blocks by writing some patterns (0xaa, 0x55, 0xff, 0x00) on
129 every block of the device, reading every block and comparing the contents.
130 This option may not be compiled with the
132 option, as they are mutually exclusive.
136 option on an device containing an existing file system.
137 This option erases data! If you want to do write-mode testing on
138 an existing file system, use the
140 option instead. It is slower, but it will preserve your data.
143 was written by Remy Card <Remy.Card@linux.org>. Current maintainer is
144 Theodore Ts'o <tytso@alum.mit.edu>. Non-destructive read/write test
145 implemented by David Beattie <dbeattie@softhome.net>.
148 is part of the e2fsprogs package and is available for anonymous
149 ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs.