Whamcloud - gitweb
Many files:
[tools/e2fsprogs.git] / e2fsck / e2fsck.8.in
1 .\" -*- nroff -*-
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.
4 .\" 
5 .TH E2FSCK 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6 .SH NAME
7 e2fsck \- check a Linux second extended file system
8 .SH SYNOPSIS
9 .B e2fsck
10 [
11 .B \-pacnyrdfvstFSV
12 ]
13 [
14 .B \-b
15 .I superblock
16 ]
17 [
18 .B \-B
19 .I blocksize
20 ]
21 [
22 .B \-l|-L
23 .I bad_blocks_file
24 ]
25 .I device
26 .SH DESCRIPTION
27 .B e2fsck
28 is used to check a Linux second extended file system.
29 .TP
30 .I device
31 is the special file corresponding to the device (e.g /dev/hdXX).
32 .SH OPTIONS
33 .TP
34 .I -a 
35 This option does the same thing as the 
36 .I -p
37 option.  It is provided for backwards compatibility only; it is
38 suggested that people use 
39 .I -p 
40 option whenever possible.
41 .TP
42 .I -b superblock
43 Instead of using the normal superblock, use the alternative superblock
44 specified by 
45 .IR superblock .
46 .TP
47 .I -B blocksize
48 Normally, 
49 .B e2fsck
50 will search for the superblock at various different
51 block sizes in an attempt to find the appropriate block size.
52 This search can be fooled in some cases.  This option forces 
53 .B e2fsck
54 to only try locating the superblock at a particular blocksize.
55 If the superblock is not found, 
56 .B e2fsck 
57 will terminate with a fatal error.
58 .TP
59 .I -c
60 This option causes 
61 .B e2fsck 
62 to run the 
63 .BR badblocks (8)
64 program to find any blocks which are bad on the filesystem, 
65 and then marks them as bad by adding them to the bad block inode.
66 .TP
67 .I -d
68 Print debugging output (useless unless you are debugging
69 .BR e2fsck ).
70 .TP
71 .I -f
72 Force checking even if the file system seems clean.
73 .TP
74 .I -F
75 Flush the filesystem device's buffer caches before beginning.  Only
76 really useful for doing 
77 .B e2fsck 
78 time trials.
79 .TP
80 .I -l filename
81 Add the blocks listed in the file specified by 
82 .I filename
83 to the list of bad blocks.
84 .TP
85 .I -L filename
86 Set the bad blocks list to be the list of blocks specified by 
87 .IR filename .
88 (This option is the same as the 
89 .I -l
90 option, except the bad blocks list is cleared before the blocks listed
91 in the file are added to the bad blocks list.)
92 .TP
93 .I -n
94 Open the filesystem read-only, and assume an answer of ``no'' to all
95 questions.  Allows
96 .B e2fsck
97 to be used non-interactively.  (Note: if the 
98 .IR -c ,
99 .IR -l ,
100 or
101 .I -L
102 options are specified in addition to the 
103 .I -n
104 option, then the filesystem will be opened read-write, to permit the
105 bad-blocks list to be updated.  However, no other changes will be made
106 to the filesystem.)
107 .TP
108 .I -p
109 Automatically repair ("preen") the file system without any questions.
110 .TP
111 .I -r
112 This option does nothing at all; it is provided only for backwards
113 compatibility.
114 .TP 
115 .I -s
116 This option will byte-swap the filesystem so that it is using the normalized, 
117 standard byte-order (which is i386 or little endian).  If the filesystem is
118 already in the standard byte-order, 
119 .B e2fsck 
120 will take no action.
121 .TP
122 .I -S
123 This option will byte-swap the filesystem, regardless of its current 
124 byte-order.
125 .TP
126 .I -t
127 Print timing statistics for
128 .BR e2fsck .
129 If this option is used twice, additional timing statistics are printed
130 on a pass by pass basis.
131 .TP
132 .I -v
133 Verbose mode.
134 .TP
135 .I -V
136 Print version information and exit.
137 .TP
138 .I -y
139 Assume an answer of ``yes'' to all questions; allows 
140 .B e2fsck
141 to be used non-interactively.
142 .SH EXIT CODE
143 The exit code returned by
144 .B e2fsck
145 is the sum of the following conditions:
146 .br
147 \       0\      \-\ No errors
148 .br
149 \       1\      \-\ File system errors corrected
150 .br
151 \       2\      \-\ File system errors corrected, system should
152 .br
153 \       \       \ \ be rebooted if file system was mounted
154 .br
155 \       4\      \-\ File system errors left uncorrected
156 .br
157 \       8\      \-\ Operational error
158 .br
159 \       16\     \-\ Usage or syntax error
160 .br
161 \       128\    \-\ Shared library error
162 .br
163 .SH REPORTING BUGS
164 Almost any piece of software will have bugs.  If you manage to find a
165 filesystem which causes 
166 .B e2fsck
167 to crash, or which 
168 .B e2fsck
169 is unable to repair, please report it to the author.
170 .PP
171 Please include as much information as possible in your bug report.
172 Ideally, include a complete transcript of the
173 .B e2fsck
174 run, so I can see exactly what error messages are displayed.  If you
175 have a writeable filesystem where the transcript can be stored, the 
176 .BR script (1)
177 program is a handy way to save the output of
178 .B e2fsck
179 to a file.
180 .PP
181 It is also useful to send the output of 
182 .BR dumpe2fs (8).
183 If a specific inode or inodes seems to be giving 
184 .B e2fsck 
185 trouble, try running the
186 .BR debugfs (8)
187 command and send the output of the 
188 .BR stat (1u)
189 command run on the relevant inode(s).  If the inode is a directory, the 
190 .B debugfs
191 .I dump
192 command will allow you to extract the contents of the directory inode,
193 which can sent to me after being first run through
194 .BR uuencode (1).
195 .PP
196 Always include the full version string which 
197 .B e2fsck
198 displays when it is run, so I know which version you are running.
199 .SH AUTHOR
200 This version of 
201 .B e2fsck
202 was written by Theodore Ts'o <tytso@mit.edu>.
203 .SH SEE ALSO
204 .BR mke2fs (8),
205 .BR tune2fs (8),
206 .BR dumpe2fs (8),
207 .BR debugfs (8)