Saturday, August 29, 2015

Rescuing my ExFAT formatted Thunderbolt drive on OS X... or was it FAT32?

I got myself an external Thunderbolt drive. Put some Parallels Virtual Machines on a ExFAT (or FAT32?) partition... Worked great for ± two weeks.

I wanted to reboot my Mac, after shutting a Windows VM down the spinner showed for 10+ minutes without any (noticeable) activity... Forced Parallels to quit and that f*cked up the something-FAT partition. After the reboot it didn't mount (the HFS+ partition on the same disk did however).

Wasn't so sure because Disk Utility showed it was "MS-DOS" (FAT32) and it didn't want to mount anymore. "Verify Disk" showed something like this:

Verifying volume “disk6s4”
Verifying file system.** /dev/rdisk6s4
Invalid sector size: 0
File system check exit code is 8.
Error: This disk needs to be repaired. Click Repair Disk.

"Repair Disk" didn't work, so I tried to mount it in Parallels so I could run Ultimate Boot CD and run testdisk or something, also didn't work...
After some googling I learned about the existence of fsck_exfat. So I tried it:
sudo fsck_exfat /dev/disk6s4
** Checking volume.
** Checking main boot region.
   Main boot region is invalid.  Trying alternate boot region.
** Checking alternate boot region.
** Checking system files.
** Volume name is Storage.
** Checking upper case translation table.
** Checking file system hierarchy.
** Checking active bitmap.
** Rechecking main boot region.
   Main boot region needs to be updated.
Update? y
** Rechecking alternate boot region.

I like the way that looked! Unfortunately, it still didn't want to mount...

Accidentally pressed the "Repair Disk" button... And guess what:
Verify and Repair volume “Storage”
Repairing file system.
Checking volume.
Checking main boot region.
Checking system files.
Volume name is Storage.
Checking upper case translation table.
Checking file system hierarchy.
Checking active bitmap.
Rechecking main boot region.
Rechecking alternate boot region.
The volume Storage appears to be OK.
File system check exit code is 0.
Updating boot support partitions for the volume as required.
Now it mounts again! \o/

Going back to the search results I found Repairing a Corrupted Mac OSX ExFAT Partition like 4 results lower which describes above method exactly.
He found out first so if this helped to save your partition too, he deserves all the credit!

No comments:

Post a Comment