fsck.exfat(8)

🌸 NAME 🌸

fsck.exfat β€” check an exFAT filesystem. that's it, that's the whole serve πŸ’–


✨ SYNOPSIS ✨

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

(and yes bestie, -v really does show up twice in there. we keep it real, we keep it exactly as written πŸ’…)


πŸ’– DESCRIPTION πŸ’–

fsck.exfat checks an exFAT filesystem and repairs it, depending on which options you pass in. it's giving doctor appointment but for your disk.

here's the tea on what it can actually repair (and lowkey, go peek at the -s option too, it's part of this story):

  • 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 β€” does the exact same thing as the -p option. it's only here for backwards compatibility, so like, vintage. the suggestion is that people use -p whenever possible. periodt.
  • -n β€” check the filesystem but do NOT attempt to repair the filesystem. look only, hands off πŸ™ˆ
  • -p β€” repair the filesystem without user interaction, if it can be done safely. no questions asked, it just goes.
  • -P β€” show a progress bar while checking the filesystem. cannot be used with the -r option. (the drama, the tension πŸ’€)
  • -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 that are unused and contiguous in the bitmap are allocated to the same file. it's giving adoption center for lost clusters πŸ₯Ί
  • --put-mbr β€” if the volume needs to be on a partition for Microsoft Windows systems because of the characteristics of the underlying device, but there's no MBR partition entries in the boot region, this attempts to amend that 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. it cannot be combined with the -b option. use the --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 that was put there with --put-mbr. the exFAT volume signatures and checksums need to be valid for this operation to work. this option cannot be combined with -b and must be combined with -r, -y or -a.
  • -v β€” prints verbose debugging information while checking the exFAT filesystem. it will yap. lovingly.
  • -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. bold. brave. iconic.

πŸ“ 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, which led to some compatibility issues. the --put-mbr option may be used to determine if the problem is due to the missing MBR partition entry, and to add it in an attempt to fix the volume. so if your volume is acting weird on Windows, that might be the lore πŸ•΅οΈβ€β™€οΈ


πŸ”₯ 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

look at her go πŸ’…βœ¨


🌈 SEE ALSO 🌈


and that's the whole page bestie 🫢 this one came straight out of the System Manager's Manual, filed under fsck.exfat(8) β€” go forth and fix your filesystem, you absolute main character πŸ‘‘πŸ’–