Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | .\" -*- nroff -*- |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 2 | .TH BADBLOCKS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 3 | .SH NAME |
| 4 | badblocks \- search a device for bad blocks |
| 5 | .SH SYNOPSIS |
| 6 | .B badblocks |
| 7 | [ |
Theodore Ts'o | dd018f5 | 2000-02-06 23:57:07 +0000 | [diff] [blame] | 8 | .B \-svwn |
| 9 | ] |
| 10 | [ |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 11 | .B \-b |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 12 | .I block-size |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 13 | ] |
| 14 | [ |
Theodore Ts'o | dd018f5 | 2000-02-06 23:57:07 +0000 | [diff] [blame] | 15 | .B \-c |
| 16 | .I blocks_at_once |
| 17 | ] |
| 18 | [ |
| 19 | .B \-i |
| 20 | .I input_file |
| 21 | ] |
| 22 | [ |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 23 | .B \-o |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 24 | .I output_file |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 25 | ] |
| 26 | [ |
Theodore Ts'o | dd018f5 | 2000-02-06 23:57:07 +0000 | [diff] [blame] | 27 | .B \-p |
| 28 | .I num_passes |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 29 | ] |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 30 | .I device |
| 31 | .IR blocks-count [ start-block ] |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 32 | .SH DESCRIPTION |
| 33 | .B badblocks |
| 34 | is used to search for bad blocks on a device (usually a disk partition). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 35 | .I device |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 36 | is the special file corresponding to the device (e.g |
| 37 | .IR /dev/hdc1 ). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 38 | .I blocks-count |
| 39 | is the number of blocks on the device. |
| 40 | .SH OPTIONS |
| 41 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 42 | .BI \-b " block-size" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 43 | Specify the size of blocks in bytes. |
| 44 | .TP |
Theodore Ts'o | dd018f5 | 2000-02-06 23:57:07 +0000 | [diff] [blame] | 45 | .BI \-c " number of blocks" |
| 46 | is the number of blocks which are tested at a time. The default is 16. |
| 47 | .TP |
| 48 | .BI \-i " input_file" |
| 49 | Read a list of already existing known bad blocks. Badblocks will skip |
| 50 | testing these blocks since they are known bad. |
| 51 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 52 | .BI \-o " output_file" |
Theodore Ts'o | dd018f5 | 2000-02-06 23:57:07 +0000 | [diff] [blame] | 53 | Write the list of bad blocks to the specified file. Without this option, |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 54 | .B badblocks |
Theodore Ts'o | 92bcc59 | 1998-02-16 22:29:34 +0000 | [diff] [blame] | 55 | displays the list on its standard output. The format of this file is suitable |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 56 | for use by the |
Theodore Ts'o | dd018f5 | 2000-02-06 23:57:07 +0000 | [diff] [blame] | 57 | . |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 58 | .B \-l |
| 59 | option in |
Theodore Ts'o | 92bcc59 | 1998-02-16 22:29:34 +0000 | [diff] [blame] | 60 | .BR e2fsck (8) |
| 61 | or |
| 62 | .BR mke2fs (8). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 63 | .TP |
Theodore Ts'o | dd018f5 | 2000-02-06 23:57:07 +0000 | [diff] [blame] | 64 | .BI \-p " num_passes" |
| 65 | Repeat scanning the disk until there are no new blocks discovered after |
| 66 | num_passes scans of the disk. |
| 67 | .TP |
| 68 | .B \-n |
| 69 | Use non-destructive read-write mode. |
| 70 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 71 | .B \-s |
Theodore Ts'o | ca8abba | 1998-01-19 14:55:24 +0000 | [diff] [blame] | 72 | Show the progress of the scan by writing out the block numbers as they |
| 73 | are checked. |
| 74 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 75 | .B \-v |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 76 | Verbose mode. |
| 77 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 78 | .B \-w |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 79 | Use write-mode test. With this option, |
| 80 | .B badblocks |
| 81 | scans for bad blocks by writing some patterns (0xaa, 0x55, 0xff, 0x00) on |
| 82 | every block of the device, reading every block and comparing the contents. |
| 83 | .SH WARNING |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 84 | Never use the |
| 85 | .B \-w |
| 86 | option on an device containing an existing file system. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 87 | This option erases data! |
| 88 | .SH AUTHOR |
| 89 | .B badblocks |
Theodore Ts'o | ffe4cab | 2000-04-03 13:27:41 +0000 | [diff] [blame^] | 90 | was written by Remy Card <Remy.Card@linux.org>. Current maintainer is |
| 91 | Theodore Ts'o <tytso@alum.mit.edu>. Non-destructive read/write test |
| 92 | implemented by David Beattie <dbeattie@usa.net>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 93 | .SH AVAILABILITY |
| 94 | .B badblocks |
Theodore Ts'o | a789d84 | 1998-03-30 01:20:55 +0000 | [diff] [blame] | 95 | is part of the e2fsprogs package and is available for anonymous |
| 96 | ftp from tsx-11.mit.edu in /pub/linux/packages/ext2fs. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 97 | .SH SEE ALSO |
| 98 | .BR e2fsck (8), |
| 99 | .BR mke2fs (8) |