# 8.1    Using built-in ‘fsck’ to fix disk

fsck is used to check and optionally repair one or more Linux file systems. The file system can be a device name (e.g. /dev/hdc1, /dev/sdb2), a mount point (e.g. /, /usr, /home). If the SATADOM is booted to terminal, then type the following command.&#x20;

$fsck /dev/sdxx

The exit code returned by fsck is the sum of the following conditions:&#x20;

0 - No errors&#x20;

1 - File system errors corrected&#x20;

2 - System should be rebooted&#x20;

4 - File system errors left uncorrected&#x20;

8 - Operational error&#x20;

16 - Usage or syntax error&#x20;

32 - Fsck canceled by user request&#x20;

128 - Shared library error

If file system errors not corrected then re-flash the image in SATADOM which is provided as backup in DVD. To re-flash refer step 3 in [Appendix G](https://diamondsystems.gitbook.io/user-manuals/sbcs/venus/linux-bsp-manual/linux-64-bit/appendix-g-dd-command-for-image-backup).
