2

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?

2 Answers2

4

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.

alexus
  • 13,667
2

Simply edit the file /etc/default/rcS

Uncomment and set FSCKFIX=yes

/etc/default/rcS
# automatically repair filesystems with inconsistencies during boot
FSCKFIX=yes

and reboot!

Do remember to put it back afterwards.

gerky
  • 291