Running openSUSE 15.1 with systemd, when it determined the need, the boot processes will invoke fsck on a particular disk. By default, this check will run in the foreground, blocking the completion of the boot processes. This has led some to desire to stop the boot-time checking completely.

I understand if my OS partition may have undergone some data corruption, fsck should block before continuing to process data on the disk. However, some of my disks are less essential to the operation of the system. Can I indicate to the system to run the fsck in the background and mount the disk on success, but to let the system load normally otherwise, either via a flag in fstab or another method?

  • Do you want fsck to run before boot completion selectively, only on specific disks (i.e., boot drive), and post-boot on other drives? Please click edit and confirm; a list of each drive and your check boot/check later preference might be helpful to use with the -t option. Please do not use Add Comment; instead, please use edit. Editing tips are at unix.stackexchange.com/editing-help#code . – K7AAY Aug 20 at 21:33
  • fsck needs to run on a file-system that is either unmounted or mounted read-only. your system can't boot normally unless it can mount its usual filesystem(s) read-write. Depending on what fs you're using, you should be able to tune the parameters that trigger an automatic fsck on boot (e.g. mount count and interval between checks on ext2/3/4 using tune2fs). Alternatively, you could use a filesystem like btrfs or zfs that don't need fsck, but can run scrub operation while the filesystem is online and in active, normal use. – cas Aug 21 at 2:16
  • Related: unix.stackexchange.com/questions/43698/… – cas Aug 21 at 2:17
  • Yes; as the question mentioned, I don't have a problem with running fsck, and even the block of the loading of the system for essential disks. I am asking for a way to run fsck at boot, but not block the loading of the system for disks I have specified as non-essential. – palswim Aug 21 at 18:12
  • FreeBSD has had this functionality since late 2001, but to my knowledge, the requisite changes that underlie background fsck have never been adopted by Linux. If you find a solution outside of SE, please come back and answer your own post. It's an interesting puzzle. – Jim L. Aug 21 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.