1997-04-26 17:21:57 +04:00
|
|
|
.\" -*- nroff -*-
|
1997-04-26 18:37:06 +04:00
|
|
|
.TH BADBLOCKS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH NAME
|
|
|
|
badblocks \- search a device for bad blocks
|
|
|
|
.SH SYNOPSIS
|
|
|
|
.B badblocks
|
|
|
|
[
|
2000-07-06 18:13:29 +04:00
|
|
|
.B \-svwnf
|
2000-02-07 02:57:07 +03:00
|
|
|
]
|
|
|
|
[
|
1997-04-26 17:21:57 +04:00
|
|
|
.B \-b
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.I block-size
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
2000-02-07 02:57:07 +03:00
|
|
|
.B \-c
|
|
|
|
.I blocks_at_once
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
2000-02-07 02:57:07 +03:00
|
|
|
.B \-i
|
|
|
|
.I input_file
|
Many files:
resize2fs.h: If EXT2_FLAT_INCLUDES is defined, then assume all
of the ext2-specific header files are in a flat directory.
ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
resize2fs.h: Rename variables named "new" to "new_block",
"new_inode", or "new_loc" to avoid C++ reserved word
clash.
ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
sim_progress.c: Use ext2fs_get_memory(),
ext2fs_free_memory(), et. al., instead of malloc() and
free().
ext2_block_move.c, ext2_inode_move.c, extent.c: Explicitly cast
all assignments from void * to be compatible with C++.
banalysis.c, banalysis.h, ext2_inode_move.c, ext2_block_move.c:
Change private to priv_data to avoid C++ namespace clash.
ChangeLog, badblocks.8.in:
badblocks.8.in: Add documentation for the -s option.
1998-01-19 17:55:24 +03:00
|
|
|
]
|
|
|
|
[
|
2000-02-07 02:57:07 +03:00
|
|
|
.B \-o
|
|
|
|
.I output_file
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
|
|
|
[
|
2000-02-07 02:57:07 +03:00
|
|
|
.B \-p
|
|
|
|
.I num_passes
|
1997-04-26 17:21:57 +04:00
|
|
|
]
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.I device
|
2000-07-06 17:19:43 +04:00
|
|
|
[
|
2001-05-05 09:43:23 +04:00
|
|
|
.I last-block
|
2000-07-06 17:19:43 +04:00
|
|
|
] [
|
|
|
|
.I start-block
|
|
|
|
]
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B badblocks
|
|
|
|
is used to search for bad blocks on a device (usually a disk partition).
|
|
|
|
.I device
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
is the special file corresponding to the device (e.g
|
|
|
|
.IR /dev/hdc1 ).
|
2001-05-05 09:43:23 +04:00
|
|
|
.I last-block
|
|
|
|
is the last block to be checked; if it is not specified, the last block
|
|
|
|
on the device is used as a default.
|
|
|
|
.I start-block
|
|
|
|
is an optional parameter specifying the starting block number
|
|
|
|
for the test, which allows the testing to start in the middle of the
|
|
|
|
disk. If it is not specified the first block on the disk is used as a default.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.BI \-b " block-size"
|
1997-04-26 17:21:57 +04:00
|
|
|
Specify the size of blocks in bytes.
|
|
|
|
.TP
|
2000-02-07 02:57:07 +03:00
|
|
|
.BI \-c " number of blocks"
|
|
|
|
is the number of blocks which are tested at a time. The default is 16.
|
2000-04-03 20:01:11 +04:00
|
|
|
Increasing this number will increase the efficiency of
|
|
|
|
.B badblocks
|
|
|
|
but also will increase its memory usage.
|
|
|
|
.B Badblocks
|
|
|
|
needs memory proportional to the number of blocks tested at once, in
|
|
|
|
read-only mode, proportional to twice that number in read-write mode,
|
|
|
|
and proportional to three times that number in non-destructive read-write
|
|
|
|
mode. If you set the number-of-blocks parameter to too high a value,
|
|
|
|
.B badblocks
|
|
|
|
will exit almost immediately with an out-of-memory error "while allocating
|
|
|
|
buffers". If you set it too low, however, for a non-destructive-write-mode
|
2000-06-12 20:45:30 +04:00
|
|
|
test, then it's possble for questionable blocks on an unreliable
|
|
|
|
hard drive to be hidden by the effects of the hard disk track buffer.
|
2000-02-07 02:57:07 +03:00
|
|
|
.TP
|
2000-07-06 18:13:29 +04:00
|
|
|
.B \-f
|
|
|
|
Normally, badblocks will refuse to do a read/write or a non-destructive
|
|
|
|
test on a device which is mounted, since this can cause the system to
|
|
|
|
potentially crash. This can be overriden using the
|
|
|
|
.B \-
|
|
|
|
flag, but this should not be done under normal circumstances. The only time
|
|
|
|
when this option might be safe is if the /etc/mtab file is incorrect, and
|
|
|
|
the device really isn't mounted.
|
|
|
|
.TP
|
2000-02-07 02:57:07 +03:00
|
|
|
.BI \-i " input_file"
|
2000-04-03 20:01:11 +04:00
|
|
|
Read a list of already existing known bad blocks.
|
|
|
|
.B Badblocks
|
|
|
|
will skip testing these blocks since they are known to be bad. If
|
|
|
|
.I input_file
|
|
|
|
is specified as "-", the list will be read from the standard input.
|
|
|
|
Blocks listed in this list will be omitted from the list of
|
|
|
|
.I new
|
|
|
|
bad blocks produced on the standard output or in the output file.
|
|
|
|
The
|
|
|
|
.B \-b
|
|
|
|
option of
|
|
|
|
.BR dumpe2fs (8)
|
|
|
|
can be used to retrieve the list of blocks currently marked bad on
|
|
|
|
an existing filesystem, in a format suitable for use with this option.
|
2000-02-07 02:57:07 +03:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.BI \-o " output_file"
|
2000-02-07 02:57:07 +03:00
|
|
|
Write the list of bad blocks to the specified file. Without this option,
|
1997-04-26 17:21:57 +04:00
|
|
|
.B badblocks
|
1998-02-17 01:29:34 +03:00
|
|
|
displays the list on its standard output. The format of this file is suitable
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
for use by the
|
2000-02-07 02:57:07 +03:00
|
|
|
.
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-l
|
|
|
|
option in
|
1998-02-17 01:29:34 +03:00
|
|
|
.BR e2fsck (8)
|
|
|
|
or
|
|
|
|
.BR mke2fs (8).
|
1997-04-26 17:21:57 +04:00
|
|
|
.TP
|
2000-02-07 02:57:07 +03:00
|
|
|
.BI \-p " num_passes"
|
2000-04-03 20:01:11 +04:00
|
|
|
Repeat scanning the disk until there are no new blocks discovered in
|
|
|
|
num_passes consecutive scans of the disk.
|
|
|
|
Default is 0, meaning
|
|
|
|
.B badblocks
|
|
|
|
will exit after the first pass.
|
2000-02-07 02:57:07 +03:00
|
|
|
.TP
|
|
|
|
.B \-n
|
2000-07-14 02:05:31 +04:00
|
|
|
Use non-destructive read-write mode. By default only a non-destructive
|
|
|
|
read-only test is done. This option must not be combined with the
|
|
|
|
.B \-w
|
|
|
|
option, as they are mutually exclusive.
|
2000-02-07 02:57:07 +03:00
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-s
|
Many files:
resize2fs.h: If EXT2_FLAT_INCLUDES is defined, then assume all
of the ext2-specific header files are in a flat directory.
ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
resize2fs.h: Rename variables named "new" to "new_block",
"new_inode", or "new_loc" to avoid C++ reserved word
clash.
ext2_block_move.c, ext2_inode_move.c, extent.c, resize2fs.c,
sim_progress.c: Use ext2fs_get_memory(),
ext2fs_free_memory(), et. al., instead of malloc() and
free().
ext2_block_move.c, ext2_inode_move.c, extent.c: Explicitly cast
all assignments from void * to be compatible with C++.
banalysis.c, banalysis.h, ext2_inode_move.c, ext2_block_move.c:
Change private to priv_data to avoid C++ namespace clash.
ChangeLog, badblocks.8.in:
badblocks.8.in: Add documentation for the -s option.
1998-01-19 17:55:24 +03:00
|
|
|
Show the progress of the scan by writing out the block numbers as they
|
|
|
|
are checked.
|
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-v
|
1997-04-26 17:21:57 +04:00
|
|
|
Verbose mode.
|
|
|
|
.TP
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
.B \-w
|
1997-04-26 17:21:57 +04:00
|
|
|
Use write-mode test. With this option,
|
|
|
|
.B badblocks
|
|
|
|
scans for bad blocks by writing some patterns (0xaa, 0x55, 0xff, 0x00) on
|
2000-07-14 02:05:31 +04:00
|
|
|
every block of the device, reading every block and comparing the contents.
|
|
|
|
This option may not be compiled with the
|
|
|
|
.B \-n
|
|
|
|
option, as they are mutually exclusive.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH WARNING
|
Many files:
badblocks.8.in, chattr.1.in, dumpe2fs.8.in, e2label.8.in,
fsck.8.in, lsattr.1.in, mke2fs.8.in, mklost+found.8.in,
tune2fs.8.in, uuidgen.1.in: Update man page to use a more standard
format (bold option flags and italicized variables), as suggested by
Andreas Dilger (adilger@enel.ucalgary.ca)
ChangeLog, e2fsck.8.in:
e2fsck.8.in: Update man page to use a more standard format (bold
option flags and italicized variables), as suggested by Andreas Dilger
(adilger@enel.ucalgary.ca)
ChangeLog, uuid_generate.3.in:
uuid_generate.8.in: Update man page to use a more standard format
(bold option flags and italicized variables), as suggested by Andreas
Dilger (adilger@enel.ucalgary.ca)
1999-10-21 23:56:34 +04:00
|
|
|
Never use the
|
|
|
|
.B \-w
|
|
|
|
option on an device containing an existing file system.
|
2000-04-03 20:01:11 +04:00
|
|
|
This option erases data! If you want to do write-mode testing on
|
|
|
|
an existing file system, use the
|
|
|
|
.B \-n
|
2000-07-14 02:05:31 +04:00
|
|
|
option instead. It is slower, but it will preserve your data.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH AUTHOR
|
|
|
|
.B badblocks
|
2000-04-03 17:27:41 +04:00
|
|
|
was written by Remy Card <Remy.Card@linux.org>. Current maintainer is
|
|
|
|
Theodore Ts'o <tytso@alum.mit.edu>. Non-destructive read/write test
|
2000-04-03 20:01:11 +04:00
|
|
|
implemented by David Beattie <dbeattie@softhome.net>.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH AVAILABILITY
|
|
|
|
.B badblocks
|
2001-05-03 18:43:43 +04:00
|
|
|
is part of the e2fsprogs package and is available from anonymous
|
|
|
|
http://e2fsprogs.sourceforge.net.
|
1997-04-26 17:21:57 +04:00
|
|
|
.SH SEE ALSO
|
|
|
|
.BR e2fsck (8),
|
|
|
|
.BR mke2fs (8)
|