Here's the tutorial:
Now you can find some command:
1. To view Mounted partition:
parted /dev/sda 'print'
To check a partition:
fsck /dev/sda6
The following are the possible exit codes for fsck command.
- 0 – No errors
- 1 – Filesystem errors corrected
- 2 – System should be rebooted
- 4 – Filesystem errors left uncorrected
- 8 – Operational error
- 16 – Usage or syntax error
- 32 – Fsck canceled by user request
- 128 – Shared-library error
fsck -A
It is recommended that you exclude the root filesystem
during this global check by adding -R option as shown below.
# fsck -AR -y
3. Don't use Fstab on filesystem mounted (like vfat) - M
# mount | grep "/dev/sd*" (to view partition mounted)
so the command of point 2. become:
# fsck -ARM -y
4. Force a Filesystem Check Even if it’s Clean using Option -f
# fsck -ARM -y /dev/sda6 -f
5. Attempt to Fix Detected Problems Automatically using Option -y
# fsck -y /dev/sda6
6. Avoid Repair, but Report Problems to Stdout using Option -n
# fsck -n /dev/sda6
7. Automatically Repair the Damaged Portions using Option -a
# fsck -a -AR
For more details take a look to original article:
http://www.thegeekstuff.com/2012/08/fsck-command-examples/?goback=.gde_84337_member_5819204731259625476#!