fsck(1M_XNX) (XENIX System Compatibility) fsck(1M_XNX)
NAME
fsck - (XENIX) check and repair XENIX filesystems
SYNOPSIS
fsck [options] [filesystem] . . .
DESCRIPTION
The fsck command audits and interactively repairs inconsistent
conditions for XENIX System V filesystems. If the filesystem
is consistent, then fsck reports number of files, number of
blocks used, and number of blocks free. If the filesystem is
inconsistent, the user is prompted whether or not fsck should
proceed with each correction. It should be noted that most
corrective actions result in some loss of data. The amount
and severity of the loss can be determined from the diagnostic
output. If the user does not have write permission, fsck
defaults to the action of the -n option.
The fsck options are:
-y Assumes a yes response to all questions asked by fsck.
-n Assumes a no response to all questions asked by fsck.
This option does not open the filesystem for writing.
-s [b:c]
Ignores the actual free list and unconditionally
reconstructs a new one by rewriting the super-block of
the filesystem. The filesystem must be unmounted
while this is done.
This option allows for creating an optimal free-list
organization. b specifies blocks per cylinder and c
specifies blocks to skip (file system interleave). If
b:c is not given, then the values that were used when
the filesystem was created are used again. If these
values were not specified, then the default value is
used.
-S Conditionally reconstructs the free list. This option
is similar to -s b:c above, except that the free list
is rebuilt only if there are no discrepancies
discovered in the filesystem. The -S option forces a
``no'' response to all questions asked by fsck. This
option is useful for forcing free-list reorganization
on uncontaminated filesystems.
Copyright 1994 Novell, Inc. Page 1
fsck(1M_XNX) (XENIX System Compatibility) fsck(1M_XNX)
-t Causes fsck to use the next argument as the scratch
file, if needed. A scratch file is used if fsck cannot
obtain enough memory to keep its tables. Without the
-t flag, fsck prompts the user for the name of the
scratch file. The file chosen should not be on the
filesystem being checked. In addition, if the scratch
file is not a special file or did not already exist,
it is removed when fsck completes. Note that if the
system has a large hard disk, there may not be enough
space on another filesystem for the scratch file. In
such cases, if the system has a floppy disk drive, use
a blank, formatted floppy disk in the floppy disk
drive with (for example) /dev/fd0 specified as the
scratch file.
-q Causes fsck to perform a quiet check. Does not print
size-check messages in Phase 1. Unreferenced fifo5
files are selectively removed. If fsck requires it,
counts in the superblock are automatically fixed and
the free list salvaged.
-D Checks directories for bad blocks. Use this option
after the system crashes.
-f Causes fsck to perform a fast check. fsck checks
block and sizes (Phase 1) and checks the free list
(Phase 5). The free list is reconstructed (Phase 6),
if necessary.
-c Causes any supported filesystem to be converted to the
current filesystem type. The user is prompted to
verify the conversion of each filesystem, unless the
-y option is specified. It is recommended that every
filesystem be checked with this option while unmounted
if it is to be used with the current version of XENIX.
To update the active root filesystem, check it with
the following command line:
fsck -c -rr /dev/root
If no filesystems are specified, fsck reads a list of default
filesystems from the /etc/checklist file.
Copyright 1994 Novell, Inc. Page 2
fsck(1M_XNX) (XENIX System Compatibility) fsck(1M_XNX)
The following are some of the inconsistencies fsck checks for:
Blocks claimed by more than one inode or the free list
Blocks claimed by an inode or the free list outside the
range of the filesystem
Incorrect link counts
Size checks:
Incorrect number of blocks
Directory size not 16-byte aligned
Bad inode format
Blocks not accounted for anywhere
Directory checks:
File pointing to unallocated inode
Inode number out of range
Super block checks:
More than 65536 inodes
More blocks for inodes than there are in the
filesystem
Bad free block list format
Total free block or free inode count incorrect
With the user's consent, fsck reconnects orphaned (allocated,
but unreferenced) files and directories by placing them in the
lost+found directory. The file's (or directory's) inode
number then becomes its name. Note that the lost+found
directory must already exist in the root of the filesystem
being checked and must have empty slots in which entries can
be made. To create the lost+found directory, copy a few files
to the directory, then remove them (before executing fsck ).
Copyright 1994 Novell, Inc. Page 3
fsck(1M_XNX) (XENIX System Compatibility) fsck(1M_XNX)
FILES
/etc/checklist Contains default list of filesystems
to check
/etc/default/boot Contains flags for automatic boot
control
NOTICES
fsck will not run on a mounted non-raw filesystem, unless the
filesystem is the root filesystem, or the -n option is
specified and no writing out of the filesystem will take
place. If any such attempt is made, fsck displays a warning
and no further processing of the filesystem is done for the
specified device.
fsck does not support filesystems created under XENIX-86
version 3.0 because the word order in type long variables has
changed. However, fsck is capable of auditing and repairing
XENIX version 3.0 filesystems if the word ordering is correct.
Run fsck /dev/?? on the unmounted block device for all other
filesystems.
It is not recommended that users use fsck on raw devices.
Although checking a raw device is almost always faster, there
is no way to tell if the filesystem is mounted. If the
filesystem is mounted, cleaning it will almost certainly
result in an inconsistent superblock.
Copyright 1994 Novell, Inc. Page 4