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
22 is used to check and optionally repair a one or more Linux file systems.
24 can be a device name (e.g.
25 .IR /dev/hdc1 ", " /dev/sdb2 ),
27 .IR / ", " /usr ", " /home ),
28 or an ext2 label or UUID specifier (e.g.
29 UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root).
32 program will try to run filesystems on different physical disk drives
33 in parallel to reduce total amount time to check all of the filesystems.
35 The exit code returned by
37 is the sum of the following conditions:
41 \ 1\ \-\ File system errors corrected
43 \ 2\ \-\ System should be rebooted
45 \ 4\ \-\ File system errors left uncorrected
47 \ 8\ \-\ Operational error
49 \ 16\ \-\ Usage or syntax error
51 \ 128\ \-\ Shared library error
53 The exit code returned when all file systems are checked using the
55 option is the bit-wise OR of the exit codes for each
56 file system that is checked.
60 is simply a front-end for the various file system checkers
61 (\fBfsck\fR.\fIfstype\fR) available under Linux. The file
62 system-specific checker is searched for in
68 and finally in the directories listed in the PATH environment
69 variable. Please see the file system-specific checker manual pages for
76 operations. This is a good idea if you checking multiple
77 filesystems and the checkers are in an interactive mode. (Note:
79 runs in an interactive mode by default. To make
81 run in a non-interactive mode, you must either specify the
85 option, if you wish for errors to be corrected automatically, or the
87 option if you do not.)
90 Specifies the type(s) of file system to be checked. When the
92 flag is specified, only filesystems that match
96 parameter is a comma-separated list of filesystems and options
97 specifiers. All of the filesystems in this comma-separated list may be
98 prefixed by a negation operator
102 which requests that only those filesystems not listed in
104 will be checked. If all of the filesystems in
106 are not prefixed by a negation operator, then only those filesystems
112 Options specifiers may be included in the comma separated
114 They must have the format
115 .BI opts= fs-option\fR,
116 and may be prefixed by a negation operator. If an options specifier is
117 present, then only filesystems whose
119 entry do (or do not, if the options specifier was prefixed by a negation
122 in their options field of the
124 file will be checked.
126 For compatibility with Mandrake distributions whose boot scripts
127 depend upon an unauthorized UI change to the
129 program, if a filesystem type of
135 were specified as an argument to the
139 Normally, the filesystem type is deduced by searching for
143 file and using the corresponding entry.
144 If the type can not be deduced, and there is only a single filesystem
145 given as an argument to the
149 will use the specified filesystem type. If this type is not
150 available, then the default file system type (currently ext2) is used.
155 file and try to check all file systems in one run. This option is
156 typically used from the
158 system initalization file, instead of multiple commands for checking
159 a single file system.
161 The root filesystem will be checked first unless the
163 option is specified (see below). After that,
164 filesystems will be checked in the order specified by the
166 (the sixth) field in the
171 value of 0 are skipped and are not checked at all.
172 If there are multiple filesystems with the same pass number,
173 fsck will attempt to check them in parallel, although it will avoid running
174 multiple filesystem checks on the same physical disk.
175 Hence, a very common configuration in
177 files is to set the root filesystem to have a
180 and to set all filesystems to have a
182 value of 2. This will allow
184 to automatically run filesystem checkers in parallel if it is advantageous
185 to do so. System administrators might choose
186 not to use this configuration if they need to avoid multiple filesystem
187 checks running in parallel for some reason --- for example, if the
188 machine in question is short on memory so that
189 excessive paging is a concern.
192 Display completion/progress bars for those filesystems checkers (currently
193 only for ext2) which support them. Fsck will manage the filesystem checkers
194 so that only one of them will display a progress bar at a time.
197 Don't execute, just show what would be done.
202 flag is set, check the root filesystem in parallel with the other filesystems.
203 This is not the safest thing in the world to do,
204 since if the root filesystem is in doubt things like the
206 executable might be corrupted! This option is mainly provided
207 for those sysadmins who don't want to repartition the root
208 filesystem to be small and compact (which is really the right solution).
211 When checking all file systems with the
213 flag, skip the root file system (in case it's already mounted read-write).
216 Don't show the title on startup.
219 Produce verbose output, including all file system-specific commands
223 Options which which are not understood by
225 are passed to the filesystem-specific checker. These arguments
227 not take arguments, as there is no
230 to be able to properly guess which arguments take options and which
233 Options and arguments which follow the
235 are treated as file system-specific options to be passed to the
236 file system-specific checker.
238 Please note that fsck is not
239 designed to pass arbitrarily complicated options to filesystem-specific
240 checkers. If you're doing something complicated, please just
241 execute the filesystem-specific checker directly. If you pass
243 some horribly complicated option and arguments, and it doesn't do
245 .B don't bother reporting it as a bug.
246 You're almost certainly doing something that you shouldn't be doing
250 Currently, standardized file system-specific options are somewhat in
251 flux. Although not guaranteed, the following options are supported
252 by most file system checkers:
255 Automatically repair the file system without any questions (use
256 this option with caution). Note that
260 for backwards compatibility only. This option is mapped to
263 option which is safe to use, unlike the
265 option that most file system checkers support.
268 Interactively repair the filesystem (ask for confirmations). Note: It
269 is generally a bad idea to use this option if multiple fsck's are being
270 run in parallel. Also note that this is
272 default behavior; it supports this option for backwards compatibility
275 Theodore Ts'o (tytso@mit.edu)
277 The manual page was shamelessly adapted from David Engel and Fred van
280 front end program, which was in turn shamelessly
281 adapted from Remy Card's version for the ext2 file system.