Add Hama WLAN PCI Card 54 Mbps to recognized cards. Bump date.
[netbsd-mini2440.git] / sbin / fsck_ext2fs / fsck_ext2fs.8
bloba59cad214cae1bc05d06c3887c97a1a1ef39c9bd
1 .\"     $NetBSD: fsck_ext2fs.8,v 1.17 2009/03/15 10:01:47 joerg Exp $
2 .\"
3 .\" Copyright (c) 1980, 1989, 1991, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\"    may be used to endorse or promote products derived from this software
16 .\"    without specific prior written permission.
17 .\"
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 .\" SUCH DAMAGE.
29 .\"
30 .\" Copyright (c) 1997 Manuel Bouyer.
31 .\"
32 .\" Redistribution and use in source and binary forms, with or without
33 .\" modification, are permitted provided that the following conditions
34 .\" are met:
35 .\" 1. Redistributions of source code must retain the above copyright
36 .\"    notice, this list of conditions and the following disclaimer.
37 .\" 2. Redistributions in binary form must reproduce the above copyright
38 .\"    notice, this list of conditions and the following disclaimer in the
39 .\"    documentation and/or other materials provided with the distribution.
40 .\"
41 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
42 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
43 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
44 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
45 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
46 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
50 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
51 .\"
52 .\"     @(#)fsck.8      8.3 (Berkeley) 11/29/94
53 .\"
54 .Dd October 9, 2008
55 .Dt FSCK_EXT2FS 8
56 .Os
57 .Sh NAME
58 .Nm fsck_ext2fs
59 .Nd EXT2 File System consistency check and interactive repair
60 .Sh SYNOPSIS
61 .Nm
62 .Op Fl dfnpUy
63 .Op Fl b Ar block#
64 .Op Fl c Ar level
65 .Op Fl m Ar mode
66 .Ar filesystem ...
67 .Sh DESCRIPTION
68 .Nm
69 performs interactive filesystem consistency checks and repair for each of
70 the filesystems specified on the command line.
71 It is normally invoked from
72 .Xr fsck 8 .
73 .Pp
74 The kernel takes care that only a restricted class of innocuous filesystem
75 inconsistencies can happen unless hardware or software failures intervene.
76 These are limited to the following:
77 .Pp
78 .Bl -item -compact
79 .It
80 Unreferenced inodes
81 .It
82 Link counts in inodes too large
83 .It
84 Missing blocks in the free map
85 .It
86 Blocks in the free map also in files
87 .It
88 Counts in the super-block wrong
89 .El
90 .Pp
91 These are the only inconsistencies that
92 .Nm
94 .Dq preen
95 mode (with the
96 .Fl p
97 option) will correct; if it encounters other inconsistencies, it exits
98 with an abnormal return status.
99 For each corrected inconsistency one or more lines will be printed
100 identifying the filesystem on which the correction will take place,
101 and the nature of the correction.
102 After successfully correcting a filesystem,
104 will print the number of files on that filesystem
105 and the number of used and free blocks.
107 If sent a
108 .Dv QUIT
109 signal,
111 will finish the filesystem checks, then exit with an abnormal return status.
113 Without the
114 .Fl p
115 option,
117 audits and interactively repairs inconsistent conditions for filesystems.
118 If the filesystem is inconsistent the operator is prompted for concurrence
119 before each correction is attempted.
120 It should be noted that some of the corrective actions which are not
121 correctable under the
122 .Fl p
123 option will result in some loss of data.
124 The amount and severity of data lost may be determined from the diagnostic
125 output.
126 The default action for each consistency correction
127 is to wait for the operator to respond
128 .Li yes
130 .Li no .
131 If the operator does not have write permission on the filesystem
133 will default to a
134 .Fl n
135 action.
137 The following flags are interpreted by
138 .Nm .
139 .Bl -tag -width indent
140 .It Fl b
141 Use the block specified immediately after the flag as
142 the super block for the filesystem.
143 Block 8193 is usually an alternate super block.
144 .It Fl d
145 Print debugging output.
146 .It Fl f
147 Force checking of file systems.
148 Normally, if a file system is cleanly unmounted, the kernel will set a
149 .Dq clean flag
150 in the file system superblock, and
152 will not check the file system.
153 This option forces
155 to check the file system, regardless of the state of the clean flag.
156 .It Fl m
157 Use the mode specified in octal immediately after the flag as the
158 permission bits to use when creating the
159 .Pa lost+found
160 directory rather than the default 1777.
161 In particular, systems that do not wish to have lost files accessible
162 by all users on the system should use a more restrictive
163 set of permissions such as 700.
164 .It Fl n
165 Assume a no response to all questions asked by
167 except for
168 .Ql CONTINUE? ,
169 which is assumed to be affirmative;
170 do not open the filesystem for writing.
171 .It Fl p
172 Specify
173 .Dq preen
174 mode, described above.
175 .It Fl U
176 Resolve numeric userids to usernames.
177 .It Fl y
178 Assume a yes response to all questions asked by
179 .Nm ;
180 this should be used with great caution as this is a free license
181 to continue after essentially unlimited trouble has been encountered.
184 Inconsistencies checked are as follows:
185 .Bl -enum -offset indent -compact
187 Blocks claimed by more than one inode or the free map.
189 Blocks claimed by an inode outside the range of the filesystem.
191 Incorrect link counts.
193 Size checks:
194 .Bl -item -offset indent -compact
196 Directory size not a multiple of filesystem block size.
198 Partially truncated file.
201 Bad inode format.
203 Blocks not accounted for anywhere.
205 Directory checks:
206 .Bl -item -offset indent -compact
208 File pointing to unallocated inode.
210 Inode number out of range.
212 Dot or dot-dot not the first two entries of a directory
213 or having the wrong inode number.
216 Super Block checks:
217 .Bl -item -offset indent -compact
219 More blocks for inodes than there are in the filesystem.
221 Bad free block map format.
223 Total free block and/or free inode count incorrect.
227 Orphaned files and directories (allocated but unreferenced) are,
228 with the operator's concurrence, reconnected by
229 placing them in the
230 .Pa lost+found
231 directory.
232 The name assigned is the inode number.
233 If the
234 .Pa lost+found
235 directory does not exist, it is created.
236 If there is insufficient space its size is increased.
238 Because of inconsistencies between the block device and the buffer cache,
239 the raw device should always be used.
240 .Sh DIAGNOSTICS
241 The diagnostics produced by
243 are fully enumerated and explained in Appendix A of
245 .%T "Fsck \- The UNIX File System Check Program"
247 .Sh SEE ALSO
248 .Xr fs 5 ,
249 .Xr fstab 5 ,
250 .Xr fsck 8 ,
251 .Xr fsdb 8 ,
252 .Xr newfs 8 ,
253 .Xr reboot 8