How to enforce boot time file system check?

Ok. While this bug is still open, here’s a temporary fix for the problem:

  1. Edit /etc/grub.d/10_linux. Change the following line (was line 152 in my setup)
	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} rw ${args}

to

	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
  1. Optional: Disable quiet mode in grub. This will print log messages while booting, rather than showing blank screen. This is useful to see if scheduled disk checks happen while booting. Edit /etc/default/grub remove quiet from GRUB_CMDLINE_LINUX_DEFAULT line.
  2. Regenerate grub config with
sudo grub-mkconfig -o /boot/grub/grub.cfg
  1. Ensure systemd-fsck-root.service is enabled/active
systemctl status systemd-fsck-root.service

if not, start with sudo systemctl enable systemd-fsck-root.service.
5. Restart.

Keep an eye on sudo dumpe2fs -h <your-disk> to see if disk checks are happening periodically. Inspect Mount Count, Maximum Mount Count, Last Checked.

Note: If there’s an update to grub, all these changes may be overwritten. You’ll need to do these steps again.

1 Like