Skip to content

Instantly share code, notes, and snippets.

@khaled-qasem
Forked from scottopell/fix_exfat_drive.md
Created October 16, 2020 22:10
Show Gist options
  • Select an option

  • Save khaled-qasem/d63e24369688264fa61c4461a5ea62d3 to your computer and use it in GitHub Desktop.

Select an option

Save khaled-qasem/d63e24369688264fa61c4461a5ea62d3 to your computer and use it in GitHub Desktop.

Revisions

  1. @scottopell scottopell renamed this gist Dec 25, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @scottopell scottopell revised this gist Dec 25, 2016. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -4,9 +4,9 @@ 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.
    a. You want the id under the IDENTIFIER column, it should look like `disk1s1`
    1. You want the id under the IDENTIFIER column, it should look like `disk1s1`
    2. Run `sudo fsck_exfat -d <id from above>`. eg `sudo fsck_exfat -d disk1s3`
    a. `-d` is debug so you'll see all your files output as they're processed.
    1. `-d` is debug so you'll see all your files output as they're processed.
    3. Answer `YES` if it gives you the prompt `Main boot region needs to be updated. Yes/No?`
    4. Open Disk Utility and you should be able to repair here successfully.

  3. @scottopell scottopell created this gist Dec 25, 2016.
    18 changes: 18 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    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.
    a. You want the id under the IDENTIFIER column, it should look like `disk1s1`
    2. Run `sudo fsck_exfat -d <id from above>`. eg `sudo fsck_exfat -d disk1s3`
    a. `-d` is debug so you'll see all your files output as they're processed.
    3. Answer `YES` if it gives you the prompt `Main boot region needs to be updated. Yes/No?`
    4. 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