Update initramfs image with required binaries (if fsk for some reason isn't there)
tee /etc/initramfs-tools/hooks/e2fsck.sh <<'EOF' >/dev/null
#!/bin/sh
. /usr/share/initramfs-tools/hook-functions
copy_exec /sbin/e2fsck /sbin
copy_exec /sbin/fsck /sbin
copy_exec /sbin/fsck.ext2 /sbin
copy_exec /sbin/fsck.ext4 /sbin
copy_exec /sbin/logsave /sbin
EOF
sudo chmod +x /etc/initramfs-tools/hooks/e2fsck.sh
sudo update-initramfs -u -k all
Configure grub to always run fsck
sudo nano /etc/default/grub.d/50-cloudimg-settings.cfg
Append fsck.mode=force fsck.repair=yes
to GRUB_CMDLINE_LINUX_DEFAULT
line as follows
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.mode=force fsck.repair=yes"
You could optionally append few other parameters,
mitigations=off zswap.enabled=1
Update grub boot image
sudo update-grub