version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
E2FSCK |
|
|
2 |
!!!E2FSCK |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
EXIT CODE |
|
|
8 |
SIGNALS |
|
|
9 |
REPORTING BUGS |
|
|
10 |
AUTHOR |
|
|
11 |
SEE ALSO |
|
|
12 |
---- |
|
|
13 |
!!NAME |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
e2fsck - check a Linux second extended file system |
|
|
17 |
!!SYNOPSIS |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
__e2fsck__ [[ __-pacnyrdfvstFSV__ ] [[ __-b__ |
|
|
21 |
''superblock'' ] [[ __-B__ ''blocksize'' ] [[ |
|
|
22 |
__-l__|__-L__ ''bad_blocks_file'' ] [[ __-C__ |
|
|
23 |
''fd'' ] [[ __-j__ ''external-journal'' ] |
|
|
24 |
''device'' |
|
|
25 |
!!DESCRIPTION |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
__e2fsck__ is used to check a Linux second extended file |
|
|
29 |
system (e2fs). E2fsck also supports ext2 filesystems |
|
|
30 |
countaining a journal, which are also sometimes known as |
|
|
31 |
ext3 filesystems. |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
''device'' is the device file where the filesystem is |
|
|
35 |
stored (e.g. ''/dev/hdc1''). |
|
|
36 |
!!OPTIONS |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
__-a__ |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
This option does the same thing as the __-p__ option. It |
|
|
43 |
is provided for backwards compatibility only; it is |
|
|
44 |
suggested that people use __-p__ option whenever |
|
|
45 |
possible. |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
__-b__ ''superblock'' |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
Instead of using the normal superblock, use an alternative |
|
|
52 |
superblock specified by ''superblock''. This option is |
|
|
53 |
normally used when the primary superblock has been |
|
|
54 |
corrupted. The location of the backup superblock is |
|
|
55 |
dependent on the filesystem's blocksize. For filesystems |
|
|
56 |
with 1k blocksizes, a backup superblock can be found at |
|
|
57 |
block 8193; for filesystems with 2k blocksizes, at block |
|
|
58 |
16384; and for 4k blocksizes, at block 32768. |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
Additional backup superblocks can be determined by using the |
|
|
62 |
__mke2fs__ program using the __-n__ option to print |
|
|
63 |
out where the superblocks were created. The __-b__ option |
|
|
64 |
to __mke2fs__, which specifies blocksize of the |
|
|
65 |
filesystem must be specified in order for the superblock |
|
|
66 |
locations that are printed out to be accurate. |
|
|
67 |
|
|
|
68 |
|
|
|
69 |
If an alternative superblock is specified and the filesystem |
|
|
70 |
is not opened read-only, e2fsck will make sure that the |
|
|
71 |
primary superblock is updated appropriately upon completion |
|
|
72 |
of the filesystem check. |
|
|
73 |
|
|
|
74 |
|
|
|
75 |
__-B__ ''blocksize'' |
|
|
76 |
|
|
|
77 |
|
|
|
78 |
Normally, __e2fsck__ will search for the superblock at |
|
|
79 |
various different block sizes in an attempt to find the |
|
|
80 |
appropriate block size. This search can be fooled in some |
|
|
81 |
cases. This option forces __e2fsck__ to only try locating |
|
|
82 |
the superblock at a particular blocksize. If the superblock |
|
|
83 |
is not found, __e2fsck__ will terminate with a fatal |
|
|
84 |
error. |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
__-c__ |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
This option causes __e2fsck__ to run the |
|
|
91 |
badblocks(8) program to find any blocks which are bad |
|
|
92 |
on the filesystem, and then marks them as bad by adding them |
|
|
93 |
to the bad block inode. If this option is specified twice, |
|
|
94 |
then the bad block scan will be done using a non-destructive |
|
|
95 |
read-write test. |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
__-C__ |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
This option causes __e2fsck__ to write completion |
|
|
102 |
information to the specified file descriptor so that the |
|
|
103 |
progress of the filesystem check can be monitored. This |
|
|
104 |
option is typically used by programs which are running |
|
|
105 |
__e2fsck__. If the file descriptor specified is 0, |
|
|
106 |
__e2fsck__ will print a completion bar as it goes about |
|
|
107 |
its business. This requires that e2fsck is running on a |
|
|
108 |
video console or terminal. |
|
|
109 |
|
|
|
110 |
|
|
|
111 |
__-d__ |
|
|
112 |
|
|
|
113 |
|
|
|
114 |
Print debugging output (useless unless you are debugging |
|
|
115 |
__e2fsck__). |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
__-f__ |
|
|
119 |
|
|
|
120 |
|
|
|
121 |
Force checking even if the file system seems |
|
|
122 |
clean. |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
__-F__ |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
Flush the filesystem device's buffer caches before |
|
|
129 |
beginning. Only really useful for doing __e2fsck__ time |
|
|
130 |
trials. |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
__-j__ ''external-journal'' |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
Set the pathname where the external-journal for this |
|
|
137 |
filesystem can be found. |
|
|
138 |
|
|
|
139 |
|
|
|
140 |
__-l__ ''filename'' |
|
|
141 |
|
|
|
142 |
|
|
|
143 |
Add the block numbers listed in the file specified by |
|
|
144 |
''filename'' to the list of bad blocks. The format of |
|
|
145 |
this file is the same as the one generated by the |
|
|
146 |
badblocks(8) program. Note that the block numbers are |
|
|
147 |
based on the blocksize of the filesystem. Hence, |
|
|
148 |
badblocks(8) must be given the blocksize of the |
|
|
149 |
filesystem in order to obtain correct results. As a result, |
|
|
150 |
it is much simpler and safer to use the __-c__ option to |
|
|
151 |
__e2fsck__, since it will assure that the correct |
|
|
152 |
parameters are passed to the __badblocks__ |
|
|
153 |
program. |
|
|
154 |
|
|
|
155 |
|
|
|
156 |
__-L__ ''filename'' |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
Set the bad blocks list to be the list of blocks specified |
|
|
160 |
by ''filename''. (This option is the same as the |
|
|
161 |
__-l__ option, except the bad blocks list is cleared |
|
|
162 |
before the blocks listed in the file are added to the bad |
|
|
163 |
blocks list.) |
|
|
164 |
|
|
|
165 |
|
|
|
166 |
__-n__ |
|
|
167 |
|
|
|
168 |
|
|
|
169 |
Open the filesystem read-only, and assume an answer of `no' |
|
|
170 |
to all questions. Allows __e2fsck__ to be used |
|
|
171 |
non-interactively. (Note: if the __-c__, __-l__, or |
|
|
172 |
__-L__ options are specified in addition to the __-n__ |
|
|
173 |
option, then the filesystem will be opened read-write, to |
|
|
174 |
permit the bad-blocks list to be updated. However, no other |
|
|
175 |
changes will be made to the filesystem.) |
|
|
176 |
|
|
|
177 |
|
|
|
178 |
__-p__ |
|
|
179 |
|
|
|
180 |
|
|
|
181 |
Automatically repair ( |
|
|
182 |
|
|
|
183 |
|
|
|
184 |
__-r__ |
|
|
185 |
|
|
|
186 |
|
|
|
187 |
This option does nothing at all; it is provided only for |
|
|
188 |
backwards compatibility. |
|
|
189 |
|
|
|
190 |
|
|
|
191 |
__-s__ |
|
|
192 |
|
|
|
193 |
|
|
|
194 |
This option will byte-swap the filesystem so that it is |
|
|
195 |
using the normalized, standard byte-order (which is i386 or |
|
|
196 |
little endian). If the filesystem is already in the standard |
|
|
197 |
byte-order, __e2fsck__ will take no action. |
|
|
198 |
|
|
|
199 |
|
|
|
200 |
__-S__ |
|
|
201 |
|
|
|
202 |
|
|
|
203 |
This option will byte-swap the filesystem, regardless of its |
|
|
204 |
current byte-order. |
|
|
205 |
|
|
|
206 |
|
|
|
207 |
__-t__ |
|
|
208 |
|
|
|
209 |
|
|
|
210 |
Print timing statistics for __e2fsck__. If this option is |
|
|
211 |
used twice, additional timing statistics are printed on a |
|
|
212 |
pass by pass basis. |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
__-v__ |
|
|
216 |
|
|
|
217 |
|
|
|
218 |
Verbose mode. |
|
|
219 |
|
|
|
220 |
|
|
|
221 |
__-V__ |
|
|
222 |
|
|
|
223 |
|
|
|
224 |
Print version information and exit. |
|
|
225 |
|
|
|
226 |
|
|
|
227 |
__-y__ |
|
|
228 |
|
|
|
229 |
|
|
|
230 |
Assume an answer of `yes' to all questions; allows |
|
|
231 |
__e2fsck__ to be used non-interactively. |
|
|
232 |
!!EXIT CODE |
|
|
233 |
|
|
|
234 |
|
|
|
235 |
The exit code returned by __e2fsck__ is the sum of the |
|
|
236 |
following conditions: |
|
|
237 |
0 - No errors |
|
|
238 |
1 - File system errors corrected |
|
|
239 |
2 - File system errors corrected, system should |
|
|
240 |
be rebooted if file system was mounted |
|
|
241 |
4 - File system errors left uncorrected |
|
|
242 |
8 - Operational error |
|
|
243 |
16 - Usage or syntax error |
|
|
244 |
128 - Shared library error |
|
|
245 |
!!SIGNALS |
|
|
246 |
|
|
|
247 |
|
|
|
248 |
The following signals have the following effect when sent to |
|
|
249 |
__e2fsck__. |
|
|
250 |
|
|
|
251 |
|
|
|
252 |
__SIGUSR1__ |
|
|
253 |
|
|
|
254 |
|
|
|
255 |
This signal causes __e2fsck__ to start displaying a |
|
|
256 |
completion bar. (See discussion of the __-C__ |
|
|
257 |
option.) |
|
|
258 |
|
|
|
259 |
|
|
|
260 |
__SIGUSR2__ |
|
|
261 |
|
|
|
262 |
|
|
|
263 |
This signal causes __e2fsck__ to stop displaying a |
|
|
264 |
completion bar. |
|
|
265 |
!!REPORTING BUGS |
|
|
266 |
|
|
|
267 |
|
|
|
268 |
Almost any piece of software will have bugs. If you manage |
|
|
269 |
to find a filesystem which causes __e2fsck__ to crash, or |
|
|
270 |
which __e2fsck__ is unable to repair, please report it to |
|
|
271 |
the author. |
|
|
272 |
|
|
|
273 |
|
|
|
274 |
Please include as much information as possible in your bug |
|
|
275 |
report. Ideally, include a complete transcript of the |
|
|
276 |
__e2fsck__ run, so I can see exactly what error messages |
|
|
277 |
are displayed. If you have a writeable filesystem where the |
|
|
278 |
transcript can be stored, the script(1) program is a |
|
|
279 |
handy way to save the output of __e2fsck__ to a |
|
|
280 |
file. |
|
|
281 |
|
|
|
282 |
|
2 |
perry |
283 |
It is also useful to send the output of dumpe2fs(8). |
1 |
perry |
284 |
If a specific inode or inodes seems to be giving |
|
|
285 |
__e2fsck__ trouble, try running the debugfs(8) |
|
|
286 |
command and send the output of the stat(1u) command |
|
|
287 |
run on the relevant inode(s). If the inode is a directory, |
|
|
288 |
the __debugfs__ ''dump'' command will allow you to |
|
|
289 |
extract the contents of the directory inode, which can sent |
|
|
290 |
to me after being first run through |
|
|
291 |
uuencode(1). |
|
|
292 |
|
|
|
293 |
|
|
|
294 |
Always include the full version string which __e2fsck__ |
|
|
295 |
displays when it is run, so I know which version you are |
|
|
296 |
running. |
|
|
297 |
!!AUTHOR |
|
|
298 |
|
|
|
299 |
|
|
|
300 |
This version of __e2fsck__ was written by Theodore Ts'o |
|
|
301 |
__ |
|
|
302 |
!!SEE ALSO |
|
|
303 |
|
|
|
304 |
|
2 |
perry |
305 |
mke2fs(8), __tune2fs__(8), __dumpe2fs__(8), |
1 |
perry |
306 |
debugfs(8) |
|
|
307 |
---- |