How to check root partition with fsck?

on January 19th, 2017 by Hades | No Comments »

Sometimes you have to check the disc “here and right now”. If you run fsck with an indication of your disk, then most likely they are to mount and fsck will warn that it is fraught for you. How to be? Unmount to check? What about the roots?

sudo touch /forcefsck

Then reboot.

or

shutdown -rF now

The -F flag means ‘force fsck’.
This only creates an advisory file /forcefsck which can be tested by the system when it comes up again. The boot rc file can test if this file is present, and decide to run fsck(1) with a special `force’ flag so that even properly unmounted file systems get checked. After that, the boot process should remove /forcefsck.

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.