Whamcloud - gitweb
3692ed8786723ba42f53eede4cd614031931ef8d
[tools/e2fsprogs.git] / misc / badblocks.8.in
1 .\" -*- nroff -*-
2 .TH BADBLOCKS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
3 .SH NAME
4 badblocks \- search a device for bad blocks
5 .SH SYNOPSIS
6 .B badblocks
7 [
8 .B \-b
9 block-size
10 ]
11 [
12 .B \-o
13 output_file
14 ]
15 [
16 .B \-s
17 ]
18 [
19 .B \-v
20 ]
21 [
22 .B \-w
23 ]
24 device
25 blocks-count [ start-block ]
26 .SH DESCRIPTION
27 .B badblocks
28 is used to search for bad blocks on a device (usually a disk partition).
29 .br
30 .I device
31 is the special file corresponding to the device (e.g /dev/hdXX).
32 .br
33 .I blocks-count
34 is the number of blocks on the device.
35 .SH OPTIONS
36 .TP
37 .I -b block-size
38 Specify the size of blocks in bytes.
39 .TP
40 .I -o output_file
41 Write the list of bad blocks to the specified file. Without this option,
42 .B badblocks
43 displays the list on its standard output.  The format of this file is suitable
44 for use by the -l option in 
45 .BR e2fsck (8)
46 or
47 .BR mke2fs (8).
48 .TP
49 .I -s
50 Show the progress of the scan by writing out the block numbers as they
51 are checked.
52 .TP
53 .I -v
54 Verbose mode.
55 .TP
56 .I -w
57 Use write-mode test. With this option,
58 .B badblocks
59 scans for bad blocks by writing some patterns (0xaa, 0x55, 0xff, 0x00) on
60 every block of the device, reading every block and comparing the contents.
61 .SH WARNING
62 Never use the `-w' option on an device containing an existing file system.
63 This option erases data!
64 .SH AUTHOR
65 .B badblocks
66 was written by Remy Card <card@masi.ibp.fr>, the developer and maintainer
67 of the ext2 fs.
68 .SH BUGS
69 I had no chance to make real tests of this program since I use IDE drives,
70 which remap bad blocks. I only made some tests on floppies.
71 .SH AVAILABILITY
72 .B badblocks
73 is part of the e2fsprogs package and is available for anonymous 
74 ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs.
75 .SH SEE ALSO
76 .BR e2fsck (8),
77 .BR mke2fs (8)