Disable Filesystem Check on Startup

From Leo's Notes
Last edited on 1 September 2019, at 05:59.

A filesystem check might occur when a system is brought up if any of the following conditions are true:

  1. The filesystem requires one (eg. number of mount counts, or number of days since last check exceeds some value)
  2. The filesystem was uncleanly mounted (most systems)
  3. A filesystem check was forced (eg. fsck.mode=force is passed as a kernel parameter)

There are a few ways to explicitly disable filesystem checks.

Disabling Filesystem Check[edit | edit source]

Tunable System parameter[edit | edit source]

Use the tune2fs command to change the number of mounts before a check is required to 0 to disable it.

# tune2fs -c 0 /dev/sda1

Where: -c is the maximum number of mounts before a check is required.

The order of the fsck that occurs is dependent on the sixth field of /etc/fstab. When setting the fs_passno field to 0, fsck will assume that the filesystem does not need to be checked.

Kernel Parameter[edit | edit source]

Append the fsck.mode=skip parameter to the kernel on startup. This can be done either by editing the boot menu config or by changing it in the boot menu.

Inversely, you can force a check by specifying fsck.mode=force and fsck.repair=yes.

Legacy[edit | edit source]

The old tricks of using /fastboot or the shutdown -f method only worked with the old SysVinit and early versions of Upstart and do not work with systemd.