Upload Tizen:Base source
[framework/base/util-linux-ng.git] / disk-utils / fsck.minix.8
1 .\" Copyright 1992, 1993, 1994 Rickard E. Faith (faith@cs.unc.edu)
2 .\" May be freely distributed.
3 .\" " for hilit19
4 .TH FSCK 8 "2 July 1996" "Util-Linux 2.6" "Linux Programmer's Manual"
5 .SH NAME
6 fsck.minix \- a file system consistency checker for Linux
7 .SH SYNOPSIS
8 .B fsck.minix
9 .RB [ \-larvsmf ]
10 .I device
11 .SH DESCRIPTION
12 .B fsck.minix
13 performs a consistency check for the Linux MINIX filesystem.  The current
14 version supports the 14 character and 30 character filename options.
15
16 The program
17 assumes the file system is quiescent.
18 .B fsck.minix
19 should not be used on a mounted device unless you can be sure nobody is
20 writing to it (and remember that the kernel can write to it when it
21 searches for files).
22
23 The device will usually have the following form:
24 .nf
25 .RS
26 /dev/hda[1-63] (IDE disk 1)
27 /dev/hdb[1-63] (IDE disk 2)
28 /dev/sda[1-15] (SCSI disk 1)
29 /dev/sdb[1-15] (SCSI disk 2)
30 .RE
31 .fi
32
33 If the file system was changed (i.e., repaired), then
34 .B fsck.minix
35 will print "FILE SYSTEM HAS CHANGED" and will
36 .BR sync (2)
37 three times before exiting.  Since Linux does not currently have raw
38 devices, there is
39 .I no
40 need to reboot at this time.
41 .SH WARNING
42 .B fsck.minix
43 should
44 .B not
45 be used on a mounted filesystem.  Using
46 .B fsck.minix
47 on a mounted filesystem is very dangerous, due to the possibility that
48 deleted files are still in use, and can seriously damage a perfectly good
49 filesystem!  If you absolutely have to run
50 .B fsck.minix
51 on a mounted filesystem (i.e., the root filesystem), make sure nothing is
52 writing to the disk, and that no files are "zombies" waiting for deletion.
53 .SH OPTIONS
54 .TP
55 .B \-l
56 Lists all filenames
57 .TP
58 .B \-r
59 Performs interactive repairs
60 .TP
61 .B \-a
62 Performs automatic repairs (this option implies
63 .BR \-r ),
64 and serves to answer all of the questions asked with the default.  Note
65 that this can be extremely dangerous in the case of extensive file system
66 damage.
67 .TP
68 .B \-v
69 Verbose
70 .TP
71 .B \-s
72 Outputs super-block information
73 .TP
74 .B \-m
75 Activates MINIX-like "mode not cleared" warnings
76 .TP
77 .B \-f
78 Force file system check even if the file system was marked as valid (this
79 marking is done by the kernel when the file system is unmounted).
80 .SH "SEE ALSO"
81 .BR fsck (8),
82 .BR fsck.ext (8),
83 .BR fsck.ext2 (8),
84 .BR fsck.xiafs (8),
85 .BR mkfs (8),
86 .BR mkfs.minix (8),
87 .BR mkfs.ext (8),
88 .BR mkfs.ext2 (8),
89 .BR mkfs.xiafs (8),
90 .BR reboot (8)
91 .SH DIAGNOSTICS
92 There are numerous diagnostic messages.  The ones mentioned here are the
93 most commonly seen in normal usage.
94
95 If the device does not exist,
96 .B fsck.minix
97 will print "unable to read super block".  If the device exists, but is not
98 a MINIX file system,
99 .B fsck.minix
100 will print "bad magic number in super-block".
101 .SH "EXIT CODES"
102 The exit code returned by
103 .B fsck.minix
104 is the sum of the following:
105 .IP 0
106 No errors
107 .IP 3
108 File system errors corrected, system should be rebooted if file system was
109 mounted
110 .IP 4
111 File system errors left uncorrected
112 .IP 8
113 Operational error
114 .IP 16
115 Usage or syntax error
116 .PP
117 In point of fact, only 0, 3, 4, 7, 8, and 16 can ever be returned.
118 .SH AUTHOR
119 Linus Torvalds (torvalds@cs.helsinki.fi)
120 .br
121 Error code values by Rik Faith (faith@cs.unc.edu)
122 .br
123 Added support for file system valid flag: Dr. Wettstein
124 (greg%wind.uucp@plains.nodak.edu)
125 .br
126 Check to prevent fsck of mounted filesystem added by Daniel Quinlan
127 (quinlan@yggdrasil.com)
128 .br
129 Minix v2 fs support by Andreas Schwab
130 (schwab@issan.informatik.uni-dortmund.de), updated by Nicolai
131 Langfeldt (janl@math.uio.no)
132 .br
133 Portability patch by Russell King (rmk@ecs.soton.ac.uk).
134 .SH AVAILABILITY
135 The fsck.minix command is part of the util-linux-ng package and is available from
136 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.