HowTo: Force fsck on boot1

a) Create /forcefsck file to force Linux to perform a full file system check:

sudo touch /forcefsck; /sbin/reboot

OR

b) Force fsck on next boot using shutdown command:

sudo shutdown -rF now

HowTo: Check partitions for errors2

a) Boot into rescue mode.

b) Login as root:

c) Run:

fsck -p /dev/sda{1..7} badblocks -v /dev/sda{1..7} > bad-blocks

d) Pass bad-blocks file to fsck command to record bad blocks:

fsck -t ext4 -l bad-blocks /dev/sda1

HowTo: Fix NTFS partitions under Linux

a) ntfsfix /dev/sda1

HowTo: Check partitions for errors interactively3

a) testdisk

  1. Based on A

  2. Based on B

  3. Based on C