Tired of this message popping up every time you SSH into an Amazon instance?
"/dev/xvda1 should be checked for errors"
And none of the “fixes” seem to work? Turns out you have to do a combination of things. SSH into the cloud and follow along.
sudo nano /etc/fstab
There should be a line describing the root (/) filesystem. Change the very last digit from a “0” to a “1”. Ctrl-O to save and Ctrl-X to exit.
sudo nano /etc/default/rcS
Near the bottom, look for the line:
And change it to:
Ctrl-O and Ctrl-X again. Finally, trigger the file check at next reboot.
sudo touch /forcefsck
Within a few seconds the instance should be back up. To conserve boot time and resources, revert the above changes to /etc/fstab and /etc/default/rcS and it should be good to go! No bothersome error message, and a solid file system.