FSCK is used to check and optionally repair one or more Linux file systems. filesystem can be a device name (e.g. /dev/hdc1, /dev/sdb2), a mount point (e.g. /, /usr, /home), or an ext2 label or UUID specifier or LABEL=root). Normally, the fsck program will try to handle filesystems on different physical disk drives in parallel to reduce the total amount of time needed to check all of the filesystems.

If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab serially. This is equivalent to the -As options.

The exit code returned by fsck is the sum of the following conditions:
0 – No errors
1 – File system errors corrected
2 – System should be rebooted
4 – File system errors left uncorrected
8 – Operational error
16 – Usage or syntax error
32 – Fsck canceled by user request
128 – Shared library error

How to force fsck on the next reboot?

Method : 1

If you want to force fsck on the next reboot, just create a file

# touch /forcefsck

Then reboot the system


Method : 2

Shutdown command with -r flag which is what ‘reboot‘ command and just requires the use of an additional argument -F to force fsck , you can do this by using below command :

#shutdown -rF now

0.00 avg. rating (0% score) - 0 votes
Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive