When encountering issues while booting, that can be solved by checking the file system for errors, it can be helpful to automatically check the file system.
Therefore add the following expressions to the line in /etc/default/grub
that starts with GRUB_CMDLINE_LINUX_DEFAULT
:
Firstly open the file:
sudo nano /etc/default/grub
Then add the following settings to GRUB_CMDLINE_LINUX_DEFAULT
:
fsck.mode=force
fsck.repair=yes
So that it looks like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet fsck.mode=force fsck.repair=yes"
Finally update grub
with:
sudo update-grub
Verify your changes with:
cat /boot/grub/grub.cfg
Sourced from askubuntu.com - Automatically force fsck