Repairing a Corrupted Mac OSX ExFAT Partition

ExFATI run a MacBook Pro Retina (late 2013) and on my 512GB hard drive I have 3 partitions

  • 150GB Mac OSX partition (currently running Mavericks)
  • 150GB Windows 8.1 partition (via Bootcamp)
  • 200GB data parition (formatted with ExFAT)

I chose an ExFAT partition so I could read and write to the data partition from either the OSX or the Windows partition as I use each operating system a similar amount. I had planned to install VMWare fusion at some point to avoid the dual boot, but haven’t sone so due to some licencing issues with some software on my Windows partition that I uncovered in the trial.

Recently I was travelling and was doing some editing for my podcast on the plane. I also inadvertantly moved and deleted some files. The next morning I woke up to deliver a workshop to find that my data partition was missing. Windows reported that the drive needed to be formatted and Mac OSX reported that the drive was corrupt. On either operating system, the relevant disk utilities were unable to fix the issue.

It appears that ExFAT partitions are not well supported in OSX, particularly if you delete files. Unfortunately due to Windows and Mac not playing nicely from a read/write perspective, neither HFS or NTFS are an option for this drive either.

A bunch of articles seemed to indicate that CHKDSK /F on the volume should fix it, but given the fact that Windows was reporting the partition needed to be formatted, this fix was not valid in this circumstance. After searching the web for numerous reports and fixes (and tearing my hair out with worry in the process), I finally stumbled on an article that led to a simple solution of a terminal command:

sudo fsck_exfat -d disk0s4

where diskos4 is your ExFAT partition.

It then asks:

Main boot region needs to be updated. Yes/No?

to which you reply Yes. You can then run repair in the OSX Disk Utility and the partition should be restored!

Easy fix, but baffles me why ExFAT and NTFS support is so bad on Mac OSX.

42 thoughts on “Repairing a Corrupted Mac OSX ExFAT Partition

  1. That terminal command worked for me, didn’t even have to fix in disk util, just enter that and restart computer. This has happened a couple times and it’s soooo annoying, so thank you for the fix!

  2. You sir saved me today! I’m sharing a video project with a Windows user so I decided to use EXFAT format and today I had 500 gigs of media appear to be gone. Followed the simple Terminal command and fixed it. After unhooking replugging it in the drive came back intact. I need to find a better way to deal with sharing with a PC user. Thanks again!.

    Erik

  3. Just remember, exFAT is an EXTENDED version of the FAT system… …It is still dependent on several files, MBR, the MFT, and also a Partition Descriptor. If any of these become damaged, or receive a command that they cannot process fully, or if bad sectors occur you’ll be stuck. Maintenance, people. Maintenance. The standard maintain functions work while the MBR is stable and the MFT is okay. But if you’re like me and move a lot of files, those get a little beat up. Running the fsck command is a way to rebuild them or check them, and make the rest of the utilities available for use, I suggest you run them to prevent more damage.

  4. It work! You save my day. Was shock to learn that my ExFAT partition gone upon MAC startup this morning and was panicked for a while until I found your solution for it. Big thanks!

  5. Another tip I discovered:

    When you run fsck_exfat on your drive and it comes up “Resource Busy” you can use the following commands:

    This will give you a list of processes using your disk:
    ps -ax | grep disk2 (but your disk)

    You will get something like this:
    13699 ?? 11:52.83 /System/Library/Filesystems/hfs.fs/Contents/Resources/./fsck_hfs -y /dev/disk2s2

    Run this to kill that process
    sudo kill 13699

    Repeat until it lets you fsck_exfat your drive 🙂

    • Thank you, I was stuck with “Resource Busy”, and finding and killing the process helped me progress. Once the offending process is killed, I got an OS prompt about an error mounting the drive (something along the lines of it being mounted in read only mode, don’t remember the wording). After that the drive mounted and I was able to run “First Aid” using “Disk Utility”

    • this worked, thanks a lot. Sudo kill, didn’t need to repair or run fsck_exfat, it mounted immediately.

  6. Seriously thanks for this post, you just saved about 4 years worth of work….I entered the command in Terminal and the disk just showed right back up like normal.

  7. Hi Craig,

    I have the exact same Macbook model and I have partitioned my hard drive exactly the same way as yours (honestly, I find the resemblance a little eerie 😀 ).

    Unlike you, I wasn’t as fortunate. OS X corrupted my ExFAT partition twice and on both accounts, “sudo fsck_exfat -d disk0s4” didn’t do the trick for me.

    I finally resorted to formatting my shared partition in NTFS and using Paragon NTFS to access the shared partition. However, I am still not really satisfied with this arrangement because I hibernate my windows partition a lot and there are some issues with files missing if OS X were to write to a partition that is hibernated.

    I would just like to know:

    1) If you are still using ExFAT for your shared partition?
    2) If you are not, what is the current configuration?

    Cheers.

    • Wayne,

      I am still using the same configuration as the post, although I tiptoe when using any shared data. I had shyed away from Paragon but perhaps I should reconsider it at some stage. Still havent found a perfect solution.

      Craig

      • hello Craig…ii have been at my external drive for a couple of days and going no where…unmouned disk with no write privileges…i got: invalid jump or signature…

  8. This solution doesn’t work for me, simply because I get the error: “Can’t open ____ (my hard drive name). No such file or directory.” Is it possible that the name I gave my drive is making it impossible for this command to execute properly? The drive is mounted (read only, the problem I’m trying to fix), and I’m not misspelling it. Any help is greatly appreciated!

  9. Hello!
    has anyone done a UDF Hard Disk (no partition or only pseudo partition table) ?
    Won’t work on a real internal volume, of course, but perhaps on a image file on some exfat partition.

    Have read:
    https://github.com/JElchison/format-udf#os-support
    and
    https://j0nam1el.wordpress.com/2015/02/20/sharing-a-hardflash-drive-across-windows-os-x-and-linux-with-udf/

    Looks cool, modern, Trans-OS and open to me.
    Only drawback ist, that neither Apple nor M$ do advertise it. But what do we expect 😉 ?

    Yours!

    AndiSho

  10. Hi Craig!
    It doesnt work very well for me. Can you see what I do wrong? It say the disk is named disk2, thats the only thing I changed from your command.
    Thanks!

    Eriks-MBP-4:~ eriknylander$ sudo fsck_exfat -d disk2
    Opening /dev/rdisk2
    ** 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.
    Eriks-MBP-4:~ eriknylander$

  11. Just wanted to thank you for this, had the same thing happen, all I did was remove from my machine and reinstall! You saved my neck 🙂

  12. I’ve been trying for two years to get my exfat drive working on my Mac again. Seems like everyone else is having luck but me 😦
    My seagate is unmountable but showing up as Disk3s2. I’ve tried running scans with no luck and all the terminal stuff but i get:

    sudo fsck_exfat -d disk3
    Password:
    Opening /dev/rdisk3
    ** 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.

    I have unbacked up photos from a year of my life that are so precious to me. I don’t have the money for a lab or expensive software. If anyone can help me, you’ll be my hero.

    • hi Patrick, in case this is still an issue for you, i’ve had a sort of a similar predicament: diskutil sees the drive but Finder doesn’t. the underlying problem is likely some exFAT corruption, but for now, until i just swing hard into HFS+ territory, i make do by executing “sudo pkill fsck” every time this happens, because apparently fsck QUIETLY launches as soon as i plug the drive in and hogs the drive for itself (for lack of a better analogy). in my case killing fsck releases the drive to other resources and i can see and access it. and even if Finder still can’t, i can just use sudo diskutil mountDisk /dev/disk2 (use your own here), and, once done, the same exact format command with unmountDisk and eject in that order because something petty is always preventing a dismount through the GUI. of course, as mentioned above, the tiptoe continues as my problems as just moved downstream, anything from “file vanished” to special character issues”, all of which pointing more and more frequently in the general direction of these kinds of exFAT-support issues. maybe time to just stop being so compatible with Windows which i haven’t used in 5 years (but always thing i should support).

      anyway, i feel like as long as you can see the device in the commandline, not all hope is lost. shoot me an email if you want, i don’t know much, but i feel like this is fixable. my gmail address is just futursimple (like the tense in French, no e at the end of future).

      • Hi Patrick!

        For unbacked up fotos: Please go to some PC hero that owns Kroll Ontrack Data Recovery.

        For your own adventure: exfat is a M$ Filesystem, so go to some Win PC and buy or bring a new drive along for the restores. (I once found a license of Kroll Ontrack EasyRecovery in a PC mag that could restore 1GB (testWare, sum or per session?). If you do it, read how first to do some binary copy of the whole drive to some new drive with dd disk dump or perhaps ontrack.)

        I once had an old HDD from some Laptop of a friend that said clickeldiclick (I mean, the hdd, i.e.: near dead, head crash whatsoever) lying in my shelf, rusting, as the friend stated “no money for professional recovery”, and my heart ached in the prospect of throwing his fotos away; and guess what? – some 5 yrs later he came “uhum, do you still have my chunky hdd?” and sent it in. Happily united with his only copy of years of family fotos he is now. More backups he does now. ;)))

        Good luck!

        Andi

        Am Mo., 6. Jan. 2020 um 07:52 Uhr schrieb Craig Smith :

        > asocialstudies commented: “hi Patrick, in case this is still an issue for > you, i’ve had a sort of a similar predicament: diskutil sees the drive but > Finder doesn’t. the underlying problem is likely some exFAT corruption, but > for now, until i just swing hard into HFS+ territory, i ” >

      • Kroll Ontrack Test Version has 1GB “for free” and can be found here: https://www.ontrack.com/de/produkte/datenrettung-software/ Can’t find it easily on English, sorry. But if it works, it may seem worth while to find some PC shop with a license of it. Or order some affordable professional data recovery. In the case on track is stating it is recoverable, a lot of services world wide offer remote services, i.e. : you install some software, and open a case, and the hdd is remotely fixed. This is much less expensive than what we have in mind when sending in a hdd.

        Am Mo., 6. Jan. 2020 um 07:52 Uhr schrieb Craig Smith :

        > asocialstudies commented: “hi Patrick, in case this is still an issue for > you, i’ve had a sort of a similar predicament: diskutil sees the drive but > Finder doesn’t. the underlying problem is likely some exFAT corruption, but > for now, until i just swing hard into HFS+ territory, i ” >

  13. Hi I’ve tried the command multiple times on an external expat drive that got corrupted during a power failure. The drive mounts and I was able to copy everything off but there were many video files on the drive and about half of them are corrupt and the file size is now listed as 0 bites or pretty small. These were all 600-700 meg files. The fsck command works but get’s stuck at a point and comes back with Abort trap: 6 – Here’s a few lines showing where it chokes. Is there anything I can do? – Thanks in advance.

    Read offset = 0x000007676000 length = 0x001000
    Read offset = 0x000007677000 length = 0x001000
    Read offset = 0x000007678000 length = 0x001000
    Assertion failed: (result->data Read offset = 0x000007679000 length = 0x001000
    == NULL), function fsck_exfat_caRead offset = 0x00000767a000 length = 0x001000
    che_recycle, file /AppleInternal/BuildRoot/Library/Caches/com.apRead offset = 0x00000767b000 length = 0x001000
    ple.xbs/Sources/exfat/exfat-208.Read offset = 0x00000767c000 length = 0x001000
    100.4/fsck/fsck_exfat_cache.c, lRead offset = 0x00000767d000 length = 0x001000
    ine 248.
    Read offset = 0x00000767e000 length = 0x001000
    Read offset = 0x00000767f000 length = 0x001000
    Read offset = 0x000007680000 length = 0x001000
    Read offset = 0x000007681000 length = 0x001000
    Read offset = 0x000007682000 length = 0x001000
    Read offset = 0x000007683000 length = 0x001000
    Read offset = 0x000007684000 length = 0x001000
    Read offset = 0x000007685000 length = 0x001000
    Read offset = 0x000007686000 length = 0x001000
    Read offset = 0x000007687000 length = 0x001000
    Read offset = 0x000007688000 length = 0x001000
    Read offset = 0x000007689000 length = 0x001000
    Read offset = 0x00000768a000 length = 0x001000
    Read offset = 0x00000768b000 length = 0x001000
    Read offset = 0x00000768c000 length = 0x001000
    Read offset = 0x00000768d000 length = 0x001000
    Read offset = 0x00000768e000 length = 0x001000
    Read offset = 0x00000768f000 length = 0x001000
    Abort trap: 6

  14. What can I do in this case…

    Opening /dev/rdisk3s1
    ** Checking volume.
    ** Checking main boot region.
    fsck_exfat: Could not read boot region
    ** The volume could not be verified completely.

Leave a reply to Craig Smith Cancel reply