I have an SD card that apparently is formatted exfat. I tried copying some music onto it, and now my CM/marshmallow phone is saying that the card is corrupted. It mounts on my linux system, and running fsck gives me some file errors. But I can't fix them. I have no access to windows (well, maybe my wife's fairly locked down work computer). I'm leaving on a trip tomorrow and don't have time to pull off, reformat through android, and then reload my files. Any ideas?
2 Answers
Note to self, since this happened again. I had to boot into a windows computer and run chkdsk. Doesn't appear to be a way to do this through linux. Maybe using testdisk, but I didn't mess with it much.
exFAT got its spec opened by Microsoft and added to a free-to-join patent pool in 2019/2020. It got incorporated into the kernel - first in 5.7, then an updated codebase from Samsung into 5.10. They also opened up their exfat helpers at https://github.com/exfatprogs/exfatprogs that include a filesystem check util.
See the different repair options of the util (interactively/no/yes/automatically). Autorepair is:
sudo fsck.exfat -a /dev/sda1
your distribution probably has it packaged under the same name "exfatprogs"
mkexfat
ormkdosfs
.