# force filesystem check on next boot
touch /forcefsck;

# check filesystem on every boot
tune2fs -C 2 -c 1 /dev/sdaX;

# check sda1 every 10 mounts or after 30 days
tune2fs -c 10 -i 30 /dev/sdaX; 

# check when last filesystem check was performed:
tune2fs -l /dev/sda1 | egrep -i "mount count|Check interval|Last|Next"

/forcefsck file will be removed afterwards (you will have to recreate it if you want to check your filesystem on every boot)

if you can boot from a rescue media: force filesystem check

# Operate only on unmounted file systems!!!
# A file system repair must be run only on unmounted file systems.
fsck -y -v -f /dev/sdaX;

liked this article?

  • only together we can create a truly free world
  • plz support dwaves to keep it up & running!
  • (yes the info on the internet is (mostly) free but beer is still not free (still have to work on that))
  • really really hate advertisement
  • contribute: whenever a solution was found, blog about it for others to find!
  • talk about, recommend & link to this blog and articles
  • thanks to all who contribute!
admin