This question already has an answer here:

On login to EC2 (Ubuntu) instance, I see

*** /dev/xvda1 should be checked for errors ***

I can't fsck /dev/xvda1 because it is mounted, and sudo umount /dev/xvda1 fails because it is in use. So I tried to use sudo touch /forcefsck as suggested here but it doesn't work, when I did it nothing happened on terminal. What to do?

marked as duplicate by mdpc, MadHatter supports Monica, womble Nov 4 '15 at 4:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Did you actually reboot the instance after performing the touch command? The command by itself just makes a file, but you have to reboot the server for the actual check to take place. – zymhan Jan 20 '15 at 19:13
  • @WildVelociraptor I had reboot the instance but nothing happened...I don't know why, but after few hours without did anything, the message is not more displayed – dr house Jan 20 '15 at 22:54
  • If it says that it should be checked for errors, there may be actual errors on it. Make (have) backups. – Halfgaar Jan 20 '15 at 22:56

as alternative to touch /forcefsck, one can attach dirty volume to another instance, run fsck on that dirty volume and reattach it back to original instance.


Simply edit the file /etc/default/rcS

Uncomment and set FSCKFIX=yes

# automatically repair filesystems with inconsistencies during boot

and reboot!

Do remember to put it back afterwards.

Not the answer you're looking for? Browse other questions tagged or ask your own question.