Skip to main content
3 of 4
More info on initrafms implementations, since it is not clear what is used in mint linux
Tim
  • 1.1k
  • 5
  • 22

Two options:

  1. Root is mounted read-only during boot and the init implementation is running fsck. Systemd is the init implementation on mint, and since you already checked if it exists there, this option does not apply.
  2. /sbin/fsck.ext4 is run in the "early user space", set up by an initramfs. Which is most probably the case in your system.

Systemd

Even if you noticed that /sbin/fsck.ext4 was run before systemd, I want tot elaborate a bit. Systemd is perfectly capable of running fsck itself, on a read-only mounted filesystem. See [email protected] documentation. Most probably this service is not enabled by default in mint, since it will be redundant with the early user space one.

Initramfs

I don't know which implementation of an initramfs mint is running, but I will use dracut as an example. (used in Debian, openSuse and more) It states the following in its mount preperation documentation:

When the root file system finally becomes visible:

  • Any maintenance tasks which cannot run on a mounted root file system are done.
  • The root file system is mounted read-only.
  • Any processes which must continue running (such as the rd.splash screen helper and its command FIFO) are hoisted into the newly-mounted root file system.

And maintenance tasks includes fsck. Further evidence, there is a possibility in dracut cmdline options to switch off fsck:

rd.skipfsck

skip fsck for rootfs and /usr. If you’re mounting /usr read-only and the init system performs fsck before remount, you might want to use this option to avoid duplication

Implementations of initramfs

An dynamic (udev based) and flexible initramfs can be implemented using the systemd infrastructure. Dracut is such an implementation and probably there are distro's out there that want to write their own.

Another option would be a script based initramfs. In such a case busybox ash is used as a scripting shell and maybe even replacing udev with mdev, or maybe just completely static. I found some people being dropped to a busybox shell due to some fsck error int mint, so this implementation could apply to mint.

If you really want to know for sure, try to decompress the initramfs file in /boot and see what's in there. It might also be possible to see it mounted under /initramfs.

Tim
  • 1.1k
  • 5
  • 22