]> git.ipfire.org Git - thirdparty/util-linux.git/blame - disk-utils/mkfs.8
Imported from util-linux-2.2 tarball.
[thirdparty/util-linux.git] / disk-utils / mkfs.8
CommitLineData
6dbe3af9
KZ
1.\" -*- nroff -*-
2.TH FSCK 8 "Jul 1993" "Version 1.8"
3.SH NAME
4fsck \- check and repair a Linux file system
5.SH SYNOPSIS
6.B fsck
7[
8.B \-A
9]
10[
11.B \-V
12]
13[
14.B \-t
15.I fstype
16]
17[
18.B fs-options
19]
20.I filesys
21.SH DESCRIPTION
22.B fsck
23is used to check and optionally repair a Linux file system.
24.I filesys
25is either the device name (e.g. /dev/hda1, /dev/sdb2) or
26the mount point (e.g. /, /usr, /home) for the file system.
27.PP
28The exit code returned by
29.B fsck
30is the sum of the following conditions:
31.br
32\ 0\ \-\ No errors
33.br
34\ 1\ \-\ File system errors corrected
35.br
36\ 2\ \-\ File system errors corrected, system should
37.br
38\ \ \ \ be rebooted if file system was mounted
39.br
40\ 4\ \-\ File system errors left uncorrected
41.br
42\ 8\ \-\ Operational error
43.br
44\ 16\ \-\ Usage or syntax error
45.br
46\ 128\ \-\ Shared library error
47.br
48The exit code returned when all file systems are checked using the
49.B -A
50option is the bit-wise OR of the exit codes for each
51file system that is checked.
52.PP
53In actuality,
54.B fsck
55is simply a front-end for the various file system checkers
56(\fBfsck\fR.\fIfstype\fR)
57available under Linux.
58The file system-specific checker is searched for in /etc/fs first,
59then in /etc and finally in the directories listed in the PATH
60environment variable.
61Please see the file system-specific checker manual pages for
62further details.
63.SH OPTIONS
64.TP
65.B -A
66Walk through the
67.I /etc/fstab
68file and try to check all file systems in one run. This option is
69typically used from the
70.I /etc/rc
71system initalization file, instead of multiple commands for checking
72a single file system. Note, that with this option, you cannot give
73the
74.I filesys
75argument as well.
76.TP
77.B -V
78Produce verbose output, including all file system-specific commands
79that are executed.
80Specifying this option more than once inhibits execution of any
81file system-specific commands.
82This is really only useful for testing.
83.TP
84.BI -t \ fstype
85Specifies the type of file system to be checked.
86If not specified, the type is deduced by searching for
87.I filesys
88in
89.I /etc/fstab
90and using the corresponding entry.
91If the type can not be deduced, the default file system type
92(currently minix) is used.
93.TP
94.B fs-options
95File system-specific options to be passed to the real file
96system checker.
97Although not guaranteed, the following options are supported
98by most file system checkers.
99.TP
100.I -a
101Automatically repair the file system without any questions (use
102this option with caution).
103.TP
104.I -l
105List all the file names in the file system.
106.TP
107.I -r
108Interactively repair the file system (ask for confirmations).
109.TP
110.I -s
111List the super block before checking the file system.
112.TP
113.I -v
114Produce verbose output.
115.SH BUGS
116All generic options must precede and not be combined with
117file system-specific options.
118Some file system-specific programs do not support the
119.I -v
120(verbose) option, nor return meaningful exit codes.
121.SH AUTHORS
122David Engel (david@ods.com)
123.br
124Fred N. van Kempen (waltje@uwalt.nl.mugnet.org)
125.br
126The manual page was shamelessly adapted from Remy Card's version
127for the ext2 file system.
128.SH SEE ALSO
129.BR mkfs (8),
130.BR fsck.minix (8),
131.BR fsck.ext (8),
132.BR fsck.ext2 (8),
133.BR fsck.xiafs (8).