Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 1 | .\" -*- nroff -*- |
Theodore Ts'o | 50e1e10 | 1997-04-26 13:58:21 +0000 | [diff] [blame] | 2 | .\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 3 | .\" This file may be copied under the terms of the GNU Public License. |
| 4 | .\" |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 5 | .TH E2FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 6 | .SH NAME |
| 7 | e2fsck \- check a Linux second extended file system |
| 8 | .SH SYNOPSIS |
| 9 | .B e2fsck |
| 10 | [ |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 11 | .B \-pacnyrdfvstFSV |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 12 | ] |
| 13 | [ |
| 14 | .B \-b |
| 15 | .I superblock |
| 16 | ] |
| 17 | [ |
| 18 | .B \-B |
| 19 | .I blocksize |
| 20 | ] |
| 21 | [ |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 22 | .BR \-l | \-L |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 23 | .I bad_blocks_file |
| 24 | ] |
Theodore Ts'o | efac9a1 | 1998-05-07 05:02:00 +0000 | [diff] [blame] | 25 | [ |
| 26 | .B \-C |
| 27 | .I fd |
| 28 | ] |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 29 | .I device |
| 30 | .SH DESCRIPTION |
| 31 | .B e2fsck |
| 32 | is used to check a Linux second extended file system. |
| 33 | .TP |
| 34 | .I device |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 35 | is the special file corresponding to the device (e.g |
| 36 | .IR /dev/hdc1 ). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 37 | .SH OPTIONS |
| 38 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 39 | .B \-a |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 40 | This option does the same thing as the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 41 | .B \-p |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 42 | option. It is provided for backwards compatibility only; it is |
| 43 | suggested that people use |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 44 | .B \-p |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 45 | option whenever possible. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 46 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 47 | .BI \-b " superblock" |
Theodore Ts'o | 24dd402 | 1998-02-01 00:16:40 +0000 | [diff] [blame] | 48 | Instead of using the normal superblock, use an alternative superblock |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 49 | specified by |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 50 | .IR superblock . |
| 51 | This option is normally used when the primary superblock has been |
Theodore Ts'o | a1ccadb | 1999-11-23 13:57:16 +0000 | [diff] [blame] | 52 | corrupted. The location of the backup superblock is dependent on the |
| 53 | filesystem's blocksize. For filesystems with 1k blocksizes, a backup |
| 54 | superblock can be found at block 8193; for filesystems with 2k |
| 55 | blocksizes, at block 16384; and for 4k blocksizes, at block 32768. If |
| 56 | an alternative superblock is specified and |
Theodore Ts'o | 24dd402 | 1998-02-01 00:16:40 +0000 | [diff] [blame] | 57 | the filesystem is not opened read-only, e2fsck will make sure that the |
| 58 | primary superblock is updated appropriately upon completion of the |
| 59 | filesystem check. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 60 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 61 | .BI \-B " blocksize" |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 62 | Normally, |
| 63 | .B e2fsck |
| 64 | will search for the superblock at various different |
| 65 | block sizes in an attempt to find the appropriate block size. |
| 66 | This search can be fooled in some cases. This option forces |
| 67 | .B e2fsck |
| 68 | to only try locating the superblock at a particular blocksize. |
| 69 | If the superblock is not found, |
| 70 | .B e2fsck |
| 71 | will terminate with a fatal error. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 72 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 73 | .B \-c |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 74 | This option causes |
| 75 | .B e2fsck |
| 76 | to run the |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 77 | .BR badblocks (8) |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 78 | program to find any blocks which are bad on the filesystem, |
| 79 | and then marks them as bad by adding them to the bad block inode. |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 80 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 81 | .B \-C |
Theodore Ts'o | efac9a1 | 1998-05-07 05:02:00 +0000 | [diff] [blame] | 82 | This option causes |
| 83 | .B e2fsck |
| 84 | to write completion information to the specified file descriptor |
| 85 | so that the progress of the filesystem |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 86 | check can be monitored. This option is typically used by programs |
| 87 | which are running |
| 88 | .BR e2fsck . |
| 89 | If the file descriptor specified is 0, |
Theodore Ts'o | efac9a1 | 1998-05-07 05:02:00 +0000 | [diff] [blame] | 90 | .B e2fsck |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 91 | will print a completion bar as it goes about its business. This requires |
| 92 | that e2fsck is running on a video console or terminal. |
Theodore Ts'o | efac9a1 | 1998-05-07 05:02:00 +0000 | [diff] [blame] | 93 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 94 | .B \-d |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 95 | Print debugging output (useless unless you are debugging |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 96 | .BR e2fsck ). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 97 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 98 | .B \-f |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 99 | Force checking even if the file system seems clean. |
| 100 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 101 | .B \-F |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 102 | Flush the filesystem device's buffer caches before beginning. Only |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 103 | really useful for doing |
| 104 | .B e2fsck |
| 105 | time trials. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 106 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 107 | .BI \-l " filename" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 108 | Add the blocks listed in the file specified by |
| 109 | .I filename |
Theodore Ts'o | 4313932 | 1998-02-16 22:34:46 +0000 | [diff] [blame] | 110 | to the list of bad blocks. The format of this file is the same as the |
| 111 | one generated by the |
| 112 | .BR badblocks (8) |
| 113 | program. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 114 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 115 | .BI \-L " filename" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 116 | Set the bad blocks list to be the list of blocks specified by |
| 117 | .IR filename . |
| 118 | (This option is the same as the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 119 | .B \-l |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 120 | option, except the bad blocks list is cleared before the blocks listed |
| 121 | in the file are added to the bad blocks list.) |
| 122 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 123 | .B \-n |
| 124 | Open the filesystem read-only, and assume an answer of `no' to all |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 125 | questions. Allows |
| 126 | .B e2fsck |
| 127 | to be used non-interactively. (Note: if the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 128 | .BR \-c , |
| 129 | .BR \-l , |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 130 | or |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 131 | .B \-L |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 132 | options are specified in addition to the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 133 | .B \-n |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 134 | option, then the filesystem will be opened read-write, to permit the |
| 135 | bad-blocks list to be updated. However, no other changes will be made |
| 136 | to the filesystem.) |
| 137 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 138 | .B \-p |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 139 | Automatically repair ("preen") the file system without any questions. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 140 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 141 | .B \-r |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 142 | This option does nothing at all; it is provided only for backwards |
| 143 | compatibility. |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 144 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 145 | .B \-s |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 146 | This option will byte-swap the filesystem so that it is using the normalized, |
| 147 | standard byte-order (which is i386 or little endian). If the filesystem is |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 148 | already in the standard byte-order, |
| 149 | .B e2fsck |
| 150 | will take no action. |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 151 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 152 | .B \-S |
Theodore Ts'o | 1e3472c | 1997-04-29 14:53:37 +0000 | [diff] [blame] | 153 | This option will byte-swap the filesystem, regardless of its current |
| 154 | byte-order. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 155 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 156 | .B \-t |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 157 | Print timing statistics for |
| 158 | .BR e2fsck . |
| 159 | If this option is used twice, additional timing statistics are printed |
| 160 | on a pass by pass basis. |
| 161 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 162 | .B \-v |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 163 | Verbose mode. |
| 164 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 165 | .B \-V |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 166 | Print version information and exit. |
| 167 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 168 | .B \-y |
| 169 | Assume an answer of `yes' to all questions; allows |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 170 | .B e2fsck |
| 171 | to be used non-interactively. |
| 172 | .SH EXIT CODE |
| 173 | The exit code returned by |
| 174 | .B e2fsck |
| 175 | is the sum of the following conditions: |
| 176 | .br |
| 177 | \ 0\ \-\ No errors |
| 178 | .br |
| 179 | \ 1\ \-\ File system errors corrected |
| 180 | .br |
| 181 | \ 2\ \-\ File system errors corrected, system should |
| 182 | .br |
| 183 | \ \ \ \ be rebooted if file system was mounted |
| 184 | .br |
| 185 | \ 4\ \-\ File system errors left uncorrected |
| 186 | .br |
| 187 | \ 8\ \-\ Operational error |
| 188 | .br |
| 189 | \ 16\ \-\ Usage or syntax error |
| 190 | .br |
| 191 | \ 128\ \-\ Shared library error |
| 192 | .br |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 193 | .SH SIGNALS |
| 194 | The following signals have the following effect when sent to |
| 195 | .BR e2fsck . |
| 196 | .TP |
| 197 | .B SIGUSR1 |
| 198 | This signal causes |
| 199 | .B e2fsck |
| 200 | to start displaying a completion bar. (See discussion of the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 201 | .B \-C |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 202 | option.) |
| 203 | .TP |
| 204 | .B SIGUSR2 |
| 205 | This signal causes |
| 206 | .B e2fsck |
| 207 | to stop displaying a completion bar. |
Theodore Ts'o | 5c57647 | 1997-04-29 15:29:49 +0000 | [diff] [blame] | 208 | .SH REPORTING BUGS |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 209 | Almost any piece of software will have bugs. If you manage to find a |
| 210 | filesystem which causes |
| 211 | .B e2fsck |
| 212 | to crash, or which |
| 213 | .B e2fsck |
| 214 | is unable to repair, please report it to the author. |
| 215 | .PP |
| 216 | Please include as much information as possible in your bug report. |
| 217 | Ideally, include a complete transcript of the |
| 218 | .B e2fsck |
| 219 | run, so I can see exactly what error messages are displayed. If you |
| 220 | have a writeable filesystem where the transcript can be stored, the |
| 221 | .BR script (1) |
| 222 | program is a handy way to save the output of |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 223 | .B e2fsck |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 224 | to a file. |
| 225 | .PP |
| 226 | It is also useful to send the output of |
| 227 | .BR dumpe2fs (8). |
| 228 | If a specific inode or inodes seems to be giving |
| 229 | .B e2fsck |
| 230 | trouble, try running the |
| 231 | .BR debugfs (8) |
| 232 | command and send the output of the |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 233 | .BR stat (1u) |
| 234 | command run on the relevant inode(s). If the inode is a directory, the |
| 235 | .B debugfs |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 236 | .I dump |
| 237 | command will allow you to extract the contents of the directory inode, |
| 238 | which can sent to me after being first run through |
| 239 | .BR uuencode (1). |
| 240 | .PP |
| 241 | Always include the full version string which |
| 242 | .B e2fsck |
| 243 | displays when it is run, so I know which version you are running. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 244 | .SH AUTHOR |
| 245 | This version of |
| 246 | .B e2fsck |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 247 | was written by Theodore Ts'o <tytso@mit.edu>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 248 | .SH SEE ALSO |
| 249 | .BR mke2fs (8), |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 250 | .BR tune2fs (8), |
| 251 | .BR dumpe2fs (8), |
| 252 | .BR debugfs (8) |