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 |
Theodore Ts'o | 4f85854 | 2009-05-30 12:34:28 -0400 | [diff] [blame] | 7 | e2fsck \- check a Linux ext2/ext3/ext4 file system |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 8 | .SH SYNOPSIS |
| 9 | .B e2fsck |
| 10 | [ |
Theodore Ts'o | 1a855cb | 2007-08-10 23:58:56 -0400 | [diff] [blame] | 11 | .B \-pacnyrdfkvtDFV |
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 | adee8d7 | 2001-07-23 00:17:49 -0400 | [diff] [blame] | 29 | @JDEV@[ |
| 30 | @JDEV@.B \-j |
| 31 | @JDEV@.I external-journal |
| 32 | @JDEV@] |
Theodore Ts'o | 0684a4f | 2002-08-17 10:19:44 -0400 | [diff] [blame] | 33 | [ |
| 34 | .B \-E |
| 35 | .I extended_options |
| 36 | ] |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 37 | .I device |
| 38 | .SH DESCRIPTION |
| 39 | .B e2fsck |
Theodore Ts'o | 4f85854 | 2009-05-30 12:34:28 -0400 | [diff] [blame] | 40 | is used to check the ext2/ext3/ext4 family of file systems. |
| 41 | For ext3 and ext4 filesystems that use a journal, if the system has been |
| 42 | shut down uncleanly without any errors, normally, after replaying the |
| 43 | committed transactions in the journal, the file system should be |
| 44 | marked as clean. Hence, for filesystems that use journalling, |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 45 | .B e2fsck |
Theodore Ts'o | 4f85854 | 2009-05-30 12:34:28 -0400 | [diff] [blame] | 46 | will normally replay the journal and exit, unless its superblock |
Theodore Ts'o | f044b4d | 2002-08-17 13:32:21 -0400 | [diff] [blame] | 47 | indicates that further checking is required. |
Theodore Ts'o | 1e9a7e0 | 2001-11-24 16:40:57 -0500 | [diff] [blame] | 48 | .PP |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 49 | .I device |
Theodore Ts'o | 1e9a7e0 | 2001-11-24 16:40:57 -0500 | [diff] [blame] | 50 | is the device file where the filesystem is stored (e.g. |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 51 | .IR /dev/hdc1 ). |
Theodore Ts'o | 73d1d49 | 2005-06-19 21:04:12 -0400 | [diff] [blame] | 52 | .PP |
| 53 | Note that in general it is not safe to run |
| 54 | .B e2fsck |
| 55 | on mounted filesystems. The only exception is if the |
| 56 | .B \-n |
| 57 | option is specified, and |
| 58 | .BR \-c , |
| 59 | .BR \-l , |
| 60 | or |
| 61 | .B -L |
| 62 | options are |
| 63 | .I not |
| 64 | specified. However, even if it is safe to do so, the results printed by |
| 65 | .B e2fsck |
| 66 | are not valid if the filesystem is mounted. If |
| 67 | .B e2fsck |
| 68 | asks whether or not you should check a filesystem which is mounted, |
| 69 | the only correct answer is ``no''. Only experts who really know what |
Theodore Ts'o | 5fb86b4 | 2005-06-20 08:24:28 -0400 | [diff] [blame] | 70 | they are doing should consider answering this question in any other way. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 71 | .SH OPTIONS |
| 72 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 73 | .B \-a |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 74 | This option does the same thing as the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 75 | .B \-p |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 76 | option. It is provided for backwards compatibility only; it is |
| 77 | suggested that people use |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 78 | .B \-p |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 79 | option whenever possible. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 80 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 81 | .BI \-b " superblock" |
Theodore Ts'o | 24dd402 | 1998-02-01 00:16:40 +0000 | [diff] [blame] | 82 | Instead of using the normal superblock, use an alternative superblock |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 83 | specified by |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 84 | .IR superblock . |
| 85 | This option is normally used when the primary superblock has been |
Theodore Ts'o | a1ccadb | 1999-11-23 13:57:16 +0000 | [diff] [blame] | 86 | corrupted. The location of the backup superblock is dependent on the |
| 87 | filesystem's blocksize. For filesystems with 1k blocksizes, a backup |
| 88 | superblock can be found at block 8193; for filesystems with 2k |
Theodore Ts'o | 5f629b7 | 2001-05-01 20:01:08 +0000 | [diff] [blame] | 89 | blocksizes, at block 16384; and for 4k blocksizes, at block 32768. |
| 90 | .IP |
| 91 | Additional backup superblocks can be determined by using the |
| 92 | .B mke2fs |
| 93 | program using the |
| 94 | .B \-n |
| 95 | option to print out where the superblocks were created. The |
| 96 | .B \-b |
| 97 | option to |
| 98 | .BR mke2fs , |
| 99 | which specifies blocksize of the filesystem must be specified in order |
| 100 | for the superblock locations that are printed out to be accurate. |
| 101 | .IP |
| 102 | If an alternative superblock is specified and |
Theodore Ts'o | 24dd402 | 1998-02-01 00:16:40 +0000 | [diff] [blame] | 103 | the filesystem is not opened read-only, e2fsck will make sure that the |
| 104 | primary superblock is updated appropriately upon completion of the |
| 105 | filesystem check. |
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 \-B " blocksize" |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 108 | Normally, |
| 109 | .B e2fsck |
| 110 | will search for the superblock at various different |
| 111 | block sizes in an attempt to find the appropriate block size. |
| 112 | This search can be fooled in some cases. This option forces |
| 113 | .B e2fsck |
| 114 | to only try locating the superblock at a particular blocksize. |
| 115 | If the superblock is not found, |
| 116 | .B e2fsck |
| 117 | will terminate with a fatal error. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 118 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 119 | .B \-c |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 120 | This option causes |
| 121 | .B e2fsck |
Theodore Ts'o | bba44f9 | 2005-12-09 18:18:06 -0500 | [diff] [blame] | 122 | to use |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 123 | .BR badblocks (8) |
Theodore Ts'o | bba44f9 | 2005-12-09 18:18:06 -0500 | [diff] [blame] | 124 | program to do a read-only scan of the device in order to find any bad |
| 125 | blocks. If any bad blocks are found, they are added to the bad block |
| 126 | inode to prevent them from being allocated to a file or directory. If |
| 127 | this option is specified twice, then the bad block scan will be done |
Theodore Ts'o | 3ed57c2 | 2001-12-24 15:01:59 -0500 | [diff] [blame] | 128 | using a non-destructive read-write test. |
Theodore Ts'o | 74becf3 | 1997-04-26 14:37:06 +0000 | [diff] [blame] | 129 | .TP |
Theodore Ts'o | 77be4d2 | 2003-03-06 12:39:55 -0500 | [diff] [blame] | 130 | .BI \-C " fd" |
Theodore Ts'o | efac9a1 | 1998-05-07 05:02:00 +0000 | [diff] [blame] | 131 | This option causes |
| 132 | .B e2fsck |
| 133 | to write completion information to the specified file descriptor |
| 134 | so that the progress of the filesystem |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 135 | check can be monitored. This option is typically used by programs |
| 136 | which are running |
| 137 | .BR e2fsck . |
Theodore Ts'o | be62523 | 2008-03-26 08:26:01 -0400 | [diff] [blame] | 138 | If the file descriptor number is negative, then absolute value of |
| 139 | the file descriptor will be used, and the progress information will be |
| 140 | suppressed initially. It can later be enabled by sending the |
| 141 | .B e2fsck |
| 142 | process a SIGUSR1 signal. |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 143 | If the file descriptor specified is 0, |
Theodore Ts'o | efac9a1 | 1998-05-07 05:02:00 +0000 | [diff] [blame] | 144 | .B e2fsck |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 145 | will print a completion bar as it goes about its business. This requires |
| 146 | that e2fsck is running on a video console or terminal. |
Theodore Ts'o | efac9a1 | 1998-05-07 05:02:00 +0000 | [diff] [blame] | 147 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 148 | .B \-d |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 149 | Print debugging output (useless unless you are debugging |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 150 | .BR e2fsck ). |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 151 | .TP |
Theodore Ts'o | 850d05e | 2002-07-25 00:00:08 -0400 | [diff] [blame] | 152 | .B \-D |
| 153 | Optimize directories in filesystem. This option causes e2fsck to |
| 154 | try to optimize all directories, either by reindexing them if the |
| 155 | filesystem supports directory indexing, or by sorting and compressing |
| 156 | directories for smaller directories, or for filesystems using |
| 157 | traditional linear directories. |
Theodore Ts'o | 1e5c6d3 | 2008-01-01 00:17:57 -0500 | [diff] [blame] | 158 | .IP |
| 159 | Even without the |
| 160 | .B \-D |
| 161 | option, |
| 162 | .B e2fsck |
| 163 | may sometimes optimize a few directories --- for example, if |
| 164 | directory indexing is enabled and a directory is not indexed and would |
| 165 | benefit from being indexed, or if the index structures are corrupted |
| 166 | and need to be rebuilt. The |
| 167 | .B \-D |
| 168 | option forces all directories in the filesystem to be optimized. This can |
| 169 | sometimes make them a little smaller and slightly faster to search, but |
| 170 | in practice, you should rarely need to use this option. |
Theodore Ts'o | a3d9d37 | 2008-02-26 12:50:51 -0500 | [diff] [blame] | 171 | .IP |
| 172 | The |
| 173 | .B \-D |
| 174 | option will detect directory entries with duplicate names in a single |
| 175 | directory, which e2fsck normally does not enforce for performance reasons. |
Theodore Ts'o | 850d05e | 2002-07-25 00:00:08 -0400 | [diff] [blame] | 176 | .TP |
Theodore Ts'o | 0684a4f | 2002-08-17 10:19:44 -0400 | [diff] [blame] | 177 | .BI \-E " extended_options" |
| 178 | Set e2fsck extended options. Extended options are comma |
| 179 | separated, and may take an argument using the equals ('=') sign. The |
| 180 | following options are supported: |
| 181 | .RS 1.2i |
| 182 | .TP |
| 183 | .BI ea_ver= extended_attribute_version |
Theodore Ts'o | 63b5e35 | 2008-08-10 22:43:24 -0400 | [diff] [blame] | 184 | Set the version of the extended attribute blocks which |
| 185 | .B e2fsck |
| 186 | will require while checking the filesystem. The version number may |
| 187 | be 1 or 2. The default extended attribute version format is 2. |
| 188 | .TP |
Bernd Schubert | 71873b1 | 2010-11-13 00:09:07 +0100 | [diff] [blame] | 189 | .BI journal_only |
| 190 | Only replay the journal if required, but do not perform any further checks |
| 191 | or repairs. |
| 192 | .TP |
Theodore Ts'o | 63b5e35 | 2008-08-10 22:43:24 -0400 | [diff] [blame] | 193 | .BI fragcheck |
| 194 | During pass 1, print a detailed report of any discontiguous blocks for |
| 195 | files in the filesystem. |
JP Abgrall | e0ed740 | 2014-03-19 19:08:39 -0700 | [diff] [blame] | 196 | .TP |
| 197 | .BI discard |
| 198 | Attempt to discard free blocks and unused inode blocks after the full |
| 199 | filesystem check (discarding blocks is useful on solid state devices and sparse |
| 200 | / thin-provisioned storage). Note that discard is done in pass 5 AFTER the |
| 201 | filesystem has been fully checked and only if it does not contain recognizable |
| 202 | errors. However there might be cases where |
| 203 | .B e2fsck |
| 204 | does not fully recognize a problem and hence in this case this |
| 205 | option may prevent you from further manual data recovery. |
| 206 | .TP |
| 207 | .BI nodiscard |
| 208 | Do not attempt to discard free blocks and unused inode blocks. This option is |
| 209 | exactly the opposite of discard option. This is set as default. |
Theodore Ts'o | 0684a4f | 2002-08-17 10:19:44 -0400 | [diff] [blame] | 210 | .RE |
| 211 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 212 | .B \-f |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 213 | Force checking even if the file system seems clean. |
| 214 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 215 | .B \-F |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 216 | Flush the filesystem device's buffer caches before beginning. Only |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 217 | really useful for doing |
| 218 | .B e2fsck |
| 219 | time trials. |
Theodore Ts'o | adee8d7 | 2001-07-23 00:17:49 -0400 | [diff] [blame] | 220 | @JDEV@.TP |
| 221 | @JDEV@.BI \-j " external-journal" |
| 222 | @JDEV@Set the pathname where the external-journal for this filesystem can be |
| 223 | @JDEV@found. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 224 | .TP |
Theodore Ts'o | 4fb9d52 | 2004-02-24 00:16:09 -0500 | [diff] [blame] | 225 | .BI \-k |
| 226 | When combined with the |
| 227 | .B \-c |
| 228 | option, any existing bad blocks in the bad blocks list are preserved, |
| 229 | and any new bad blocks found by running |
| 230 | .BR badblocks (8) |
| 231 | will be added to the existing bad blocks list. |
| 232 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 233 | .BI \-l " filename" |
Theodore Ts'o | 3ed57c2 | 2001-12-24 15:01:59 -0500 | [diff] [blame] | 234 | Add the block numbers listed in the file specified by |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 235 | .I filename |
Theodore Ts'o | 4313932 | 1998-02-16 22:34:46 +0000 | [diff] [blame] | 236 | to the list of bad blocks. The format of this file is the same as the |
| 237 | one generated by the |
| 238 | .BR badblocks (8) |
Theodore Ts'o | 3ed57c2 | 2001-12-24 15:01:59 -0500 | [diff] [blame] | 239 | program. Note that the block numbers are based on the blocksize |
| 240 | of the filesystem. Hence, |
| 241 | .BR badblocks (8) |
| 242 | must be given the blocksize of the filesystem in order to obtain correct |
| 243 | results. As a result, it is much simpler and safer to use the |
| 244 | .B -c |
| 245 | option to |
| 246 | .BR e2fsck , |
| 247 | since it will assure that the correct parameters are passed to the |
| 248 | .B badblocks |
Theodore Ts'o | 4313932 | 1998-02-16 22:34:46 +0000 | [diff] [blame] | 249 | program. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 250 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 251 | .BI \-L " filename" |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 252 | Set the bad blocks list to be the list of blocks specified by |
| 253 | .IR filename . |
| 254 | (This option is the same as the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 255 | .B \-l |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 256 | option, except the bad blocks list is cleared before the blocks listed |
| 257 | in the file are added to the bad blocks list.) |
| 258 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 259 | .B \-n |
| 260 | 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] | 261 | questions. Allows |
| 262 | .B e2fsck |
Theodore Ts'o | 298c9c2 | 2010-03-12 19:18:20 -0500 | [diff] [blame] | 263 | to be used non-interactively. This option |
Theodore Ts'o | 84d3518 | 2005-12-09 17:28:56 -0500 | [diff] [blame] | 264 | may not be specified at the same time as the |
| 265 | .B \-p |
| 266 | or |
| 267 | .B \-y |
| 268 | options. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 269 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 270 | .B \-p |
Theodore Ts'o | 0f589a4 | 2008-10-01 20:27:41 -0400 | [diff] [blame] | 271 | Automatically repair ("preen") the file system. This option will cause |
Theodore Ts'o | 84d3518 | 2005-12-09 17:28:56 -0500 | [diff] [blame] | 272 | .B e2fsck |
| 273 | to automatically |
| 274 | fix any filesystem problems that can be safely fixed without human |
| 275 | intervention. If |
| 276 | .B e2fsck |
| 277 | discovers a problem which may require the system administrator |
| 278 | to take additional corrective action, |
| 279 | .B e2fsck |
| 280 | will print a description of the problem and then exit with the value 4 |
| 281 | logically or'ed into the exit code. (See the \fBEXIT CODE\fR section.) |
| 282 | This option is normally used by the system's boot scripts. It may not |
| 283 | be specified at the same time as the |
| 284 | .B \-n |
| 285 | or |
| 286 | .B \-y |
| 287 | options. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 288 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 289 | .B \-r |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 290 | This option does nothing at all; it is provided only for backwards |
| 291 | compatibility. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 292 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 293 | .B \-t |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 294 | Print timing statistics for |
| 295 | .BR e2fsck . |
| 296 | If this option is used twice, additional timing statistics are printed |
| 297 | on a pass by pass basis. |
| 298 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 299 | .B \-v |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 300 | Verbose mode. |
| 301 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 302 | .B \-V |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 303 | Print version information and exit. |
| 304 | .TP |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 305 | .B \-y |
| 306 | Assume an answer of `yes' to all questions; allows |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 307 | .B e2fsck |
Theodore Ts'o | 84d3518 | 2005-12-09 17:28:56 -0500 | [diff] [blame] | 308 | to be used non-interactively. This option |
| 309 | may not be specified at the same time as the |
| 310 | .B \-n |
| 311 | or |
| 312 | .B \-p |
| 313 | options. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 314 | .SH EXIT CODE |
| 315 | The exit code returned by |
| 316 | .B e2fsck |
| 317 | is the sum of the following conditions: |
| 318 | .br |
| 319 | \ 0\ \-\ No errors |
| 320 | .br |
| 321 | \ 1\ \-\ File system errors corrected |
| 322 | .br |
| 323 | \ 2\ \-\ File system errors corrected, system should |
| 324 | .br |
Theodore Ts'o | 4cae045 | 2002-07-21 14:14:03 -0400 | [diff] [blame] | 325 | \ \ \ \ be rebooted |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 326 | .br |
| 327 | \ 4\ \-\ File system errors left uncorrected |
| 328 | .br |
| 329 | \ 8\ \-\ Operational error |
| 330 | .br |
| 331 | \ 16\ \-\ Usage or syntax error |
| 332 | .br |
Theodore Ts'o | 4cae045 | 2002-07-21 14:14:03 -0400 | [diff] [blame] | 333 | \ 32\ \-\ E2fsck canceled by user request |
| 334 | .br |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 335 | \ 128\ \-\ Shared library error |
| 336 | .br |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 337 | .SH SIGNALS |
| 338 | The following signals have the following effect when sent to |
| 339 | .BR e2fsck . |
| 340 | .TP |
| 341 | .B SIGUSR1 |
| 342 | This signal causes |
| 343 | .B e2fsck |
Theodore Ts'o | be62523 | 2008-03-26 08:26:01 -0400 | [diff] [blame] | 344 | to start displaying a completion bar or emitting progress information. |
| 345 | (See discussion of the |
Theodore Ts'o | caf8ce4 | 1999-10-21 19:56:34 +0000 | [diff] [blame] | 346 | .B \-C |
Theodore Ts'o | 5596def | 1999-07-19 15:27:37 +0000 | [diff] [blame] | 347 | option.) |
| 348 | .TP |
| 349 | .B SIGUSR2 |
| 350 | This signal causes |
| 351 | .B e2fsck |
Theodore Ts'o | be62523 | 2008-03-26 08:26:01 -0400 | [diff] [blame] | 352 | to stop displaying a completion bar or emitting progress information. |
Theodore Ts'o | 5c57647 | 1997-04-29 15:29:49 +0000 | [diff] [blame] | 353 | .SH REPORTING BUGS |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 354 | Almost any piece of software will have bugs. If you manage to find a |
| 355 | filesystem which causes |
| 356 | .B e2fsck |
| 357 | to crash, or which |
| 358 | .B e2fsck |
| 359 | is unable to repair, please report it to the author. |
| 360 | .PP |
| 361 | Please include as much information as possible in your bug report. |
| 362 | Ideally, include a complete transcript of the |
| 363 | .B e2fsck |
Theodore Ts'o | 15f5051 | 2005-06-05 16:46:19 -0400 | [diff] [blame] | 364 | run, so I can see exactly what error messages are displayed. (Make sure |
| 365 | the messages printed by |
| 366 | .B e2fsck |
| 367 | are in English; if your system has been |
| 368 | configured so that |
| 369 | .BR e2fsck 's |
| 370 | messages have been translated into another language, please set the the |
| 371 | .B LC_ALL |
| 372 | environment variable to |
| 373 | .B C |
| 374 | so that the transcript of e2fsck's output will be useful to me.) |
| 375 | If you |
Theodore Ts'o | 8139367 | 2005-04-16 14:05:09 -0400 | [diff] [blame] | 376 | have a writable filesystem where the transcript can be stored, the |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 377 | .BR script (1) |
| 378 | program is a handy way to save the output of |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 379 | .B e2fsck |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 380 | to a file. |
| 381 | .PP |
| 382 | It is also useful to send the output of |
| 383 | .BR dumpe2fs (8). |
| 384 | If a specific inode or inodes seems to be giving |
| 385 | .B e2fsck |
| 386 | trouble, try running the |
| 387 | .BR debugfs (8) |
| 388 | command and send the output of the |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 389 | .BR stat (1u) |
| 390 | command run on the relevant inode(s). If the inode is a directory, the |
| 391 | .B debugfs |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 392 | .I dump |
| 393 | command will allow you to extract the contents of the directory inode, |
| 394 | which can sent to me after being first run through |
Theodore Ts'o | 15f5051 | 2005-06-05 16:46:19 -0400 | [diff] [blame] | 395 | .BR uuencode (1). |
| 396 | The most useful data you can send to help reproduce |
Theodore Ts'o | 9447f38 | 2006-05-22 17:59:37 -0400 | [diff] [blame] | 397 | the bug is a compressed raw image dump of the filesystem, generated using |
Theodore Ts'o | 15f5051 | 2005-06-05 16:46:19 -0400 | [diff] [blame] | 398 | .BR e2image (8). |
| 399 | See the |
| 400 | .BR e2image (8) |
| 401 | man page for more details. |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 402 | .PP |
| 403 | Always include the full version string which |
| 404 | .B e2fsck |
| 405 | 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] | 406 | .SH AUTHOR |
| 407 | This version of |
| 408 | .B e2fsck |
Theodore Ts'o | 583ccdc | 1997-05-09 03:06:31 +0000 | [diff] [blame] | 409 | was written by Theodore Ts'o <tytso@mit.edu>. |
Theodore Ts'o | 3839e65 | 1997-04-26 13:21:57 +0000 | [diff] [blame] | 410 | .SH SEE ALSO |
Theodore Ts'o | 9329866 | 2008-06-18 11:27:21 -0400 | [diff] [blame] | 411 | .BR e2fsck.conf (5), |
Theodore Ts'o | cd84823 | 2006-03-27 12:10:07 -0500 | [diff] [blame] | 412 | .BR badblocks (8), |
Theodore Ts'o | f3db356 | 1997-04-26 13:34:30 +0000 | [diff] [blame] | 413 | .BR dumpe2fs (8), |
Theodore Ts'o | 15f5051 | 2005-06-05 16:46:19 -0400 | [diff] [blame] | 414 | .BR debugfs (8), |
Theodore Ts'o | cd84823 | 2006-03-27 12:10:07 -0500 | [diff] [blame] | 415 | .BR e2image (8), |
| 416 | .BR mke2fs (8), |
| 417 | .BR tune2fs (8) |