Force filesystem check on a AWS EC2 (ubuntu 14.04)

I’ve recently noticed that an Amazon EC2 VPS instance spawn the message when logging in:

So here’s a recipie to solve the issue (as root), if you are in the same situation:

  1. Edit /etc/fstab and locate the line your external storage, the last digit 0 should be changed to a 1 (otherwise it will skip the check of that disk).
  2. Edit /etc/defaults/rcS and change the FSCKFIX=yes (and un-comment if needed)
  3. Create a file called /forcefsck in the root of the server.
  4. Reboot and wait while the server restarts and performs the check.
  5. If solved, revoke the changes you made to /etc/defaults/rcS and /etc/fstab

Hope it’s any help for someone out there.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.