~ubuntu-branches/ubuntu/edgy/e2fsprogs/edgy

« back to all changes in this revision

Viewing changes to e2fsck/e2fsck.8.in

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-03-21 23:58:48 UTC
  • Revision ID: james.westby@ubuntu.com-20020321235848-cmmy98hy0nihp922
Tags: upstream-1.27
ImportĀ upstreamĀ versionĀ 1.27

Show diffs side-by-side

added added

removed removed

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