Skip to content

Instantly share code, notes, and snippets.

@nazrdogan
Forked from scottopell/fix_exfat_drive.md
Created February 14, 2019 19:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nazrdogan/056b0c54c5ee78792c92ee34c853036a to your computer and use it in GitHub Desktop.
Save nazrdogan/056b0c54c5ee78792c92ee34c853036a to your computer and use it in GitHub Desktop.
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
  6. Open Disk Utility and you should be able to repair here successfully.

See the apple man page below for details on the fsck_exfat utility.

Sources/Extra Reading: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/fsck_exfat.8.html https://craigsmith.id.au/2014/07/06/repairing-a-corrupted-mac-osx-exfat-partition/ https://discussions.apple.com/thread/4154638?tstart=0

@nazrdogan
Copy link
Author

To fix the error "Can't open /dev/rdisk2s2: Resource Busy". you can download and launch Disk Arbitrator to prevent the disk from being mounted when is is plugged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment