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

@Titencer
Copy link

Titencer commented Jan 6, 2024

  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 '. 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.

Hey! Did this after getting my 6tb ExFat drive to at least be view only. Prior to this, I tried sudo pkill -f fsck but that did not allow the drive to mount, nor be repaired through First Aid. Since running the above command, it's been going files for a couple hours now. Is this supposed to take a super long time? Worried it's just stuck in fsck_exfat again. It's view only now but I won't be able to get another hard drive for a little bit.

@Titencer
Copy link

Titencer commented Jan 6, 2024

  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 '. 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.

Hey! Did this after getting my 6tb ExFat drive to at least be view only. Prior to this, I tried sudo pkill -f fsck but that did not allow the drive to mount, nor be repaired through First Aid. Since running the above command, it's been going files for a couple hours now. Is this supposed to take a super long time? Worried it's just stuck in fsck_exfat again. It's view only now but I won't be able to get another hard drive for a little bit.

Adding to this - I'm running macOS Ventura 13.6.1 (22G313)

@heihaheihaha
Copy link

Hi @scottopell, thanks, I tried this method, the result was: ** Checking volume. ** Checking main boot region. fsck_exfat: Invalid jump or signature Main boot region is invalid. Trying alternate boot region. ** Checking alternate boot region. fsck_exfat: Invalid jump or signature Alternate boot region is invalid. ** The volume could not be verified completely.

Any idea what might be wrong, how could I fix this? Thanks in advance, att

My solution is link the disk to a Windows computer, it repaired the disk auto. Unbelievable.

@livingperson
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.

@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