fsck.exfat(8)

NAME
fsck.exfat - check an exFAT filesystem

SYNOPSIS
fsck.exfat [ -a ] [ -n ] [ -r ] [ -v ] [ -y ] [ -b ] [ -P ] [ -v ] device
fsck.exfat -V

DESCRIPTION
fsck.exfat checks an exFAT filesystem and repairs the filesystem depending on the options passed. The following corruptions can be repaired, and see the option, '-s'.

-   Boot sector has invalid parameters. If backup boot sector is valid, replace the boot sector with it.

-   Cluster is marked as free but belonged to a file, or vise versa. The bitmap for the cluster is marked properly.

-   File size is abnormally large considering the count of clusters. The size is changed.

-   File size is abnormally small considering the count of clusters. The remaining clusters are deleted.

-   File's cluster chain has an invalid cluster number. The number are changed to EOF, and the file size is also changed.

-   File's cluster chain contains a loop. The loop is broken.

-   Files share the same cluster. Cluster chains for files except one are broken.

-   Start cluster number is invalid. The cluster number and file size are changed to 0.

-   Checksum value of directory entry set is invalid. Directory entry set is deleted.

-   Bad hash value of a file name. The hash value is changed properly.

-   Fields of directory entry set have invalid values. Directory entry set is deleted.

OPTIONS

-a  This option does the same thing as the -p option. It is provided for backwards compatibility only; it is suggested that people use -p option whenever possible.

-n  Check the filesystem but do not attempt to repair the filesystem.

-p  Repair the filesystem without user interaction if it can be done safely.

-P  Show progress bar while checking the filesystem. Cannot be used with -r option.

-r  Repair the filesystem interactively.

-s  Create files in /LOST+FOUND for orphan clusters. These files have clusters allocated but not belonged to any files when repairing the filesystem. Clusters unused and contiguous in bitmap are allocated to the same file.

--put-mbr
    If the volume needs to be on a partition for Microsoft Windows systems due to the characteristics of underlying device but there's no MBR partition entries in the boot region, attempt to amend this by creating a partition entry that covers the entire device, including LBA 0(main boot sector) itself. This option has no effect if the volume is already on a partition. This option cannot be combined with -b option. Use --clear-mbr option to revert the process.

--clear-mbr
    Remove all partition entries in the MBR. Use this option to scrub the partition table entry put with --put-mbr option. The exFAT volume signatures and checksums need to be valid for this operation to work. This option cannot be combined with -b option and must be combined with -r, -y or -a option.

-v  Prints verbose debugging information while checking the exFAT filesystem.

-V  Prints the version number and exits.

-y  Repair the filesystem answering yes to all questions.

-b  Try to repair the filesystem even if the exFAT filesystem is not found.

NOTE
mkfs.exfat version 1.3.2 and older created exFAT volumes with no MBR partition entry even when it was required for use with Microsoft Windows systems, leading to some compatibility issues. --put-mbr option may be used to determine if the problem is due to the missing MBR partition entry and add it in attempt to fix the volume.

EXAMPLES

repair a corrupted device and create files in /LOST+FOUND, which have clusters allocated but not belonged to any files when repairing the device.
    $ fsck.exfat -p -s /dev/sda1

SEE ALSO
fsck(8), fstab(5), mkfs.exfat(8)