systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck-usr.service, systemd-fsck — File system checker logic
systemd-fsck-usr.service are services responsible for file system checks. They are
instantiated for each device that is configured for file system checking.
responsible for file system checks on the root and /usr file system, respectively, but only if the root
filesystem was not checked in the initrd.
systemd-fsck@.service is used for all
other file systems and for the root file system in the initrd.
These services are started at boot if
for the file system is set to a value greater than zero, but only if it is also configured to be
mounted at boot (i.e. without "
noauto" option). 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
fsck.). These checkers will decide if
the filesystem should actually be checked based on the time since
last check, number of mounts, unclean unmount, etc.
reboot.target if fsck returns the "System
should reboot" condition, or
emergency.target if fsck
returns the "Filesystem errors left uncorrected" condition.
systemd-fsck@.service will fail if
fsck returns with either "System should reboot"
or "Filesystem errors left uncorrected" conditions. For filesystems
/etc/fstab without "
noauto" options, "
will then activate
systemd-fsck understands these kernel command line parameters:
One of "
the mode of operation. The default is "
and ensures that file system checks are done when the file
system checker deems them necessary. "
unconditionally results in full file system checks.
skip" skips any file system
One of "
no". Controls the
mode of operation. The default is "
and will automatically repair problems that can be safely
yes" will answer yes to all
questions by fsck and "
no" will answer no to