SYSTEMD-FSCK@.SERVICE(8)

๐Ÿ’– systemd-fsck@.service โ€” the manual page, bestie edition ๐Ÿ’–

okay so you opened systemd-fsck@.service(8) and you're like "what is this" โ€” don't worry, I got you. this is the file system checker logic page. let's go โœจ


๐ŸŒธ NAME ๐ŸŒธ

systemd-fsck@.service, systemd-fsck-root.service, systemd-fsck-usr.service, systemd-fsck โ€” literally just the file system checker logic, that's the whole vibe ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

systemd-fsck@.service
systemd-fsck-root.service
systemd-fsck-usr.service
/usr/lib/systemd/systemd-fsck

โœจ DESCRIPTION โœจ

so systemd-fsck@.service, systemd-fsck-root.service, and systemd-fsck-usr.service are the services that do file system checks. they get instantiated for every device that's configured for file system checking โ€” one per device, cute ๐ŸŽ€

systemd-fsck-root.service and systemd-fsck-usr.service are the ones handling the root and /usr file systems respectively โ€” but only if the root filesystem wasn't already checked in the initrd. and systemd-fsck@.service? that's the one for all the other file systems, plus the root file system when you're inside the initrd. slay.

these services start at boot if passno in /etc/fstab for that file system is set to a value greater than zero โ€” but only if it's also configured to be mounted at boot (i.e. it does NOT have the "noauto" option). no auto, no service, periodt.

the root file system check happens before the other file systems. the other ones may be checked in parallel โ€” except when they live on the same rotating disk. spinny disks gotta take turns, bestie ๐ŸŒ€

systemd-fsck does not know any details about specific filesystems, ngl. it just executes file system checkers specific to each filesystem type (fsck.type). those checkers are the ones deciding whether the filesystem actually needs checking, based on the time since last check, number of mounts, unclean unmount, etc. it's giving "I don't make the rules, I just run the binaries."

systemd-fsck-root.service and systemd-fsck-usr.service will activate reboot.target if fsck(8) returns the "System should reboot" condition, or emergency.target if fsck returns the "Filesystem errors left uncorrected" condition. yeah. emergency mode. the drama ๐Ÿ˜ญ

systemd-fsck@.service will fail if fsck(8) returns either the "System should reboot" or the "Filesystem errors left uncorrected" condition. and for filesystems listed in /etc/fstab without "nofail" or "noauto" options, local-fs.target will then activate emergency.target. so likeโ€ฆ don't skip the nofail unless you mean it ๐Ÿ™ˆ


๐Ÿ‘‘ 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 it makes sure file system checks happen when the file system checker deems them necessary. "force" unconditionally results in full file system checks. "skip" skips any file system checks. (yes, "skip" skips. icon behavior.)

Added in version 186.

  • fsck.repair= โ€” one of "preen", "yes", "no". controls the mode of operation. the default is "preen", and it 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. consent matters, even for fsck ๐Ÿ’–

Added in version 213.


๐Ÿ’œ CREDENTIALS ๐Ÿ’œ

systemd-fsck supports the service credentials logic as implemented by ImportCredential=/LoadCredential=/SetCredential= (see systemd.exec(5) for details). the following credentials are used when passed in:

  • fsck.mode, fsck.repair โ€” the contents of the credentials are parsed in the same way as the kernel command line options of the same name. see above for more details, bestie, I already explained it up there โ˜๏ธ

Added in version 258.

note that by default the systemd-fsck@.service, systemd-fsck-root.service, and systemd-fsck-usr.service unit files are set up to inherit both fsck.mode and fsck.repair credentials from the service manager. it's giving family heirloom ๐ŸŒˆ

๐ŸŒŸ 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)


and that's the whole page, you're officially fsck-fluent ๐Ÿงš this was systemd 262.1, and the page you just read is SYSTEMD-FSCK@.SERVICE(8). go check your filesystems, bestie, they're probably fine ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms