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 FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
7 fsck \- check and repair a Linux file system
26 is used to check and optionally repair a Linux file system.
28 is either the device name (e.g. /dev/hda1, /dev/sdb2) or the mount point
29 (e.g. /, /usr, /home) for the file system. If this invocation of
31 has several filesystems on different physical disk drives to check, then
33 will try to run them in parallel. This reduces the total amount time it
34 takes to check all of the filesystems, since
36 takes advantage of the parallelism of multiple disk spindles.
38 The exit code returned by
40 is the sum of the following conditions:
44 \ 1\ \-\ File system errors corrected
46 \ 2\ \-\ System should be rebooted
48 \ 4\ \-\ File system errors left uncorrected
50 \ 8\ \-\ Operational error
52 \ 16\ \-\ Usage or syntax error
54 \ 128\ \-\ Shared library error
56 The exit code returned when all file systems are checked using the
58 option is the bit-wise OR of the exit codes for each
59 file system that is checked.
63 is simply a front-end for the various file system checkers
64 (\fBfsck\fR.\fIfstype\fR) available under Linux. The file
65 system-specific checker is searched for in /sbin first, then in /etc/fs
66 and /etc, and finally in the directories listed in the PATH environment
67 variable. Please see the file system-specific checker manual pages for
74 file and try to check all file systems in one run. This option is
75 typically used from the
77 system initalization file, instead of multiple commands for checking
80 The root filesystem will be checked first unless the
82 option is specified (see below). After that,
83 filesystems will be checked in the order specified by the
85 (the sixth) field in the
87 file. If there are multiple filesystems with the same pass number,
88 e2fsck will attempt to check them in parallel, although it will avoid running
89 multiple filesystem checks on the same physical disk. Hence,
90 a very common configuration in
92 files is to set the root filesystem to have a
95 and to set all filesystems to have a
97 value of 2. This will allow
99 to automatically run filesystem checkers in parallel if it is advantageous
100 to do so. System administrators might choose
101 not to use this configuration if they need to avoid multiple filesystem
102 checks running in parallel for some reason --- for example, if the
103 machine in question is short on memory so that
104 excessive paging is a concern.
107 When checking all file systems with the
109 flag, skip the root file system (in case it's already mounted read-write).
112 Don't show the title on startup.
115 Don't execute, just show what would be done.
120 flag is set, check the root filesystem in parallel with the other filesystems.
121 This is not the safest thing in the world to do,
122 since if the root filesystem is in doubt things like the
124 executable might be corrupted! This option is mainly provided
125 for those sysadmins who don't want to repartition the root
126 filesystem to be small and compact (which is really the right solution).
131 operations. This is a good idea if you checking multiple
132 filesystems and the checkers are in an interactive mode. (Note:
134 runs in an interactive mode by default. To make
136 run in a non-interactive mode, you must either specify the
140 option, if you wish for errors to be corrected automatically, or
143 option if you do not.)
146 Produce verbose output, including all file system-specific commands
150 Specifies the type of file system to be checked. When the
152 flag is specified, only filesystems that match
158 then only filesystems whose type does not match
162 Normally, the filesystem type is deduced by searching for
166 file and using the corresponding entry.
167 If the type can not be deduced,
169 will use the type specified by the
171 option if it specifies a unique filesystem type. If this type is not
172 available, then the default file system type (currently ext2) is used.
175 Any options which are not understood by
179 option are treated as file system-specific options to be passed to the
180 file system-specific checker.
182 Currently, standardized file system-specific options are somewhat in
183 flux. Although not guaranteed, the following options are supported
184 by most file system checkers:
187 Automatically repair the file system without any questions (use
188 this option with caution). Note that
192 for backwards compatibility only. This option is mapped to
195 option which is safe to use, unlike the
197 option that most file system checkers support.
200 Interactively repair the filesystem (ask for confirmations). Note: It
201 is generally a bad idea to use this option if multiple fsck's are being
202 run in parallel. Also note that this is
204 default behavior; it supports this option for backwards compatibility
207 Theodore Ts'o (tytso@mit.edu)
209 The manual page was shamelessly adapted from David Engel and Fred van
212 front end program, which was in turn shamelessly
213 adapted from Remy Card's version for the ext2 file system.