Skip to content

Instantly share code, notes, and snippets.

@scottopell
Last active June 5, 2024 07:56
Show Gist options
  • Save scottopell/595717f0f77ef670f75498bd01f8cab1 to your computer and use it in GitHub Desktop.
Save scottopell/595717f0f77ef670f75498bd01f8cab1 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

@suebphattana
Copy link

Also had issues mentioned above. My solution was to connect it to Windows, and do the following:

Run Disk Error Checking

  1. Plug in your external hard disk.
  2. Open File Explorer by pressing the Windows keys button + E.
  3. Go to This PC.
  4. Right-click your external hard disk under Devices and drives.
  5. Select Properties
  6. Go to Tools tab.
  7. Under Error checking, click Check.
  8. If prompted, click Yes or enter the administrator password.
  9. Click Scan drive > Repair drive.
  10. Wait for the process to finish.
  11. The scanning process may take a while depending on the size of your external hard disk and the specifications of your PC.

Saved my life! thanks!

@ibassman
Copy link

ibassman commented Jun 5, 2024

So I figured out how to unbrick my drive, but it required loading up a VM of Windows in Parallels and directing USB over to it. Windows fixed the drive and loaded it up just fine, and after the job, it loaded up in macOS right after.

Hey. My external hard disk stopped working while I was switching between mac and parallel windows vm.
Can you please share how you fixed your drive? (If it doesn't involve a format)
Thanks

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