2 .\" Copyright 1993, 1994, 1995 by Theodore Ts'o. All Rights Reserved.
3 .\" This file may be copied under the terms of the GNU Public License.
5 .TH E2FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
7 e2fsck \- check a Linux second extended file system
32 is used to check a Linux second extended file system (e2fs). E2fsck also
33 supports ext2 filesystems countaining a journal, which are
34 also sometimes known as ext3 filesystems.
37 is the special file corresponding to the device (e.g
42 This option does the same thing as the
44 option. It is provided for backwards compatibility only; it is
45 suggested that people use
47 option whenever possible.
50 Instead of using the normal superblock, use an alternative superblock
53 This option is normally used when the primary superblock has been
54 corrupted. The location of the backup superblock is dependent on the
55 filesystem's blocksize. For filesystems with 1k blocksizes, a backup
56 superblock can be found at block 8193; for filesystems with 2k
57 blocksizes, at block 16384; and for 4k blocksizes, at block 32768. If
58 an alternative superblock is specified and
59 the filesystem is not opened read-only, e2fsck will make sure that the
60 primary superblock is updated appropriately upon completion of the
66 will search for the superblock at various different
67 block sizes in an attempt to find the appropriate block size.
68 This search can be fooled in some cases. This option forces
70 to only try locating the superblock at a particular blocksize.
71 If the superblock is not found,
73 will terminate with a fatal error.
80 program to find any blocks which are bad on the filesystem,
81 and then marks them as bad by adding them to the bad block inode.
86 to write completion information to the specified file descriptor
87 so that the progress of the filesystem
88 check can be monitored. This option is typically used by programs
91 If the file descriptor specified is 0,
93 will print a completion bar as it goes about its business. This requires
94 that e2fsck is running on a video console or terminal.
97 Print debugging output (useless unless you are debugging
101 Force checking even if the file system seems clean.
104 Flush the filesystem device's buffer caches before beginning. Only
105 really useful for doing
110 Add the blocks listed in the file specified by
112 to the list of bad blocks. The format of this file is the same as the
118 Set the bad blocks list to be the list of blocks specified by
120 (This option is the same as the
122 option, except the bad blocks list is cleared before the blocks listed
123 in the file are added to the bad blocks list.)
126 Open the filesystem read-only, and assume an answer of `no' to all
129 to be used non-interactively. (Note: if the
134 options are specified in addition to the
136 option, then the filesystem will be opened read-write, to permit the
137 bad-blocks list to be updated. However, no other changes will be made
141 Automatically repair ("preen") the file system without any questions.
144 This option does nothing at all; it is provided only for backwards
148 This option will byte-swap the filesystem so that it is using the normalized,
149 standard byte-order (which is i386 or little endian). If the filesystem is
150 already in the standard byte-order,
155 This option will byte-swap the filesystem, regardless of its current
159 Print timing statistics for
161 If this option is used twice, additional timing statistics are printed
162 on a pass by pass basis.
168 Print version information and exit.
171 Assume an answer of `yes' to all questions; allows
173 to be used non-interactively.
175 The exit code returned by
177 is the sum of the following conditions:
181 \ 1\ \-\ File system errors corrected
183 \ 2\ \-\ File system errors corrected, system should
185 \ \ \ \ be rebooted if file system was mounted
187 \ 4\ \-\ File system errors left uncorrected
189 \ 8\ \-\ Operational error
191 \ 16\ \-\ Usage or syntax error
193 \ 128\ \-\ Shared library error
196 The following signals have the following effect when sent to
202 to start displaying a completion bar. (See discussion of the
209 to stop displaying a completion bar.
211 Almost any piece of software will have bugs. If you manage to find a
212 filesystem which causes
216 is unable to repair, please report it to the author.
218 Please include as much information as possible in your bug report.
219 Ideally, include a complete transcript of the
221 run, so I can see exactly what error messages are displayed. If you
222 have a writeable filesystem where the transcript can be stored, the
224 program is a handy way to save the output of
228 It is also useful to send the output of
230 If a specific inode or inodes seems to be giving
232 trouble, try running the
234 command and send the output of the
236 command run on the relevant inode(s). If the inode is a directory, the
239 command will allow you to extract the contents of the directory inode,
240 which can sent to me after being first run through
243 Always include the full version string which
245 displays when it is run, so I know which version you are running.
249 was written by Theodore Ts'o <tytso@mit.edu>.