FSCK(1) General Commands Manual FSCK(1)NAME
fsck, fsck1 - perform file system consistency check
SYNOPSIS
fsck [-aclmrs] [device] ...
OPTIONS -a Automatically repair inconsistencies
-c Check and list only the specified i-nodes
-l List the files and directories in the filesytem
-r Prompt user for repairs if inconsistencies are found
-s List the superblock of the file system
EXAMPLES
fsck /dev/hd4 # Check file system on /dev/hd4
fsck -a /dev/at0 # Automatically fix errors on /dev/at0
fsck -l /dev/fd0 # List the contents of /dev/fd0
fsck -c 2 3 /dev/hd3
# Check and list /dev/hd3 i-nodes 2 & 3
DESCRIPTION
Fsck performs consistency checks on the file systems which reside on the specified devices. Fsck1 is an alternate version for use on obso-
lete V1 file systems. 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).
FSCK(1)
Check Out this Related Man Page
SYSTEMD-FSCK@.SERVICE(8) systemd-fsck@.service SYSTEMD-FSCK@.SERVICE(8)NAME
systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck - File system checker logic
SYNOPSIS
systemd-fsck@.service
systemd-fsck-root.service
/lib/systemd/systemd-fsck
DESCRIPTION
systemd-fsck@.service and systemd-fsck-root.service are services responsible for file system checks. They are instantiated for each device
that is configured for file system checking. systemd-fsck-root.service is responsible for file system checks on the root file system, but
only if the root filesystem was not checked in the initramfs. systemd-fsck@.service is used for all other file systems and for the root
file system in the initramfs.
These services are started at boot if passno in /etc/fstab for the file system is set to a value greater than zero. The file system check
for root is performed before the other file systems. Other file systems may be checked in parallel, except when they are on the same
rotating disk.
systemd-fsck does not know any details about specific filesystems, and simply executes file system checkers specific to each filesystem
type (/sbin/fsck.*). This helper will decide if the filesystem should actually be checked based on the time since last check, number of
mounts, unclean unmount, etc.
If a file system check fails for a service without nofail, emergency mode is activated, by isolating to emergency.target.
KERNEL COMMAND LINE
systemd-fsck understands these kernel command line parameters:
fsck.mode=
One of "auto", "force", "skip". Controls the mode of operation. The default is "auto", and ensures that file system checks are done
when the file system checker deems them necessary. "force" unconditionally results in full file system checks. "skip" skips any file
system checks.
fsck.repair=
One of "preen", "yes", "no". Controls the mode of operation. The default is "preen", and will automatically repair problems that can be
safely fixed. "yes" will answer yes to all questions by fsck and "no" will answer no to all questions.
SEE ALSO systemd(1), fsck(8), systemd-quotacheck.service(8), fsck.btrfs(8), fsck.cramfs(8), fsck.ext4(8), fsck.fat(8), fsck.hfsplus(8),
fsck.minix(8), fsck.ntfs(8), fsck.xfs(8)systemd 237 SYSTEMD-FSCK@.SERVICE(8)