xref: /minix/minix/commands/fsck.mfs/fsck.mfs.1 (revision 0a6a1f1d)
FSCK 1
NAME
fsck - perform file system consistency check
SYNOPSIS
fsck [-aclmrs] [device] ...

\\\$1\ \\$2 ..

20 \\\$1\ # \\$2 ..

OPTIONS

5 -a # Automatically repair inconsistencies

5 -c # Check and list only the specified i-nodes

5 -l # List the files and directories in the filesytem

5 -r # Prompt user for repairs if inconsistencies are found

5 -s # List the superblock of the file system

EXAMPLES

20 fsck /dev/c0d0p3 # Check file system on /dev/c0d0p3

20 fsck -a /dev/at0 # Automatically fix errors on /dev/at0

20 fsck -l /dev/fd0 # List the contents of /dev/fd0

20 fsck -c 2 3 /dev/c0d0p2 # Check and list /dev/c0d0p2 i-nodes 2 & 3

DESCRIPTION

Fsck performs consistency checks on the file systems which reside on the specified devices. When either the -a or -r flags are given, the file system will be repaired if errors are found. Before running fsck on a mounted file system, it must first be unmounted. Trying to repair a mounted file system is dangerous and should not be attempted.

To repair the root file system (which cannot be unmounted), first type CTRL-F9 at the console to kill any and all processes. Log back in as root, type sync to force any buffered changes to disk, run fsck on the root file system and immediately reboot the computer by typing reboot.

It is necessary to kill all processes before repairing the root file system to prevent them from modifying any disk blocks while fsck is running. This is only necessary for the root file system, any other file system can simply be unmounted before it is checked.

"SEE ALSO"
mkfs (1), mount (1). disk name refs corrected, i.e., old hd1 now c0d0p0 -- ASW 2005-01-15