Force fsck on next reboot

July 19, 2010
By

fsck your main partition on the next bootLet’s say you run a headless server and you want to fsck the main partition. The easy solution in this case is (if possible) to force fsck to run on the next boot.

If you run slackware than all you really need is to create an empty file in /etc called forcefsck

You could do this by running:

1
touch /etc/forcefsck

Other linux distributions might check for this file elsewhere, for example in the root directory so the command would be

1
touch /forcefsck

Checking the documentation will always help.

Tags: , , ,

  • http://www.sergiozambrano.es Sergio Zambrano

    Do
    sudo tune2fs -C 10000 /dev/xxxx && rebooot

    This change the counter of times de system is booted.
    -C is in uppercase and xxxx is the device to check

  • http://www.sgvulcan.com/ silviu

    Indeed this would work as well. Still I find my sollution is the proper way.

Follow Me

Subscribe via RSS