My portable exFAT hard drive got corrupted during a system upgrade. Maybe because it was plugged in. I couldn’t figure out what caused it.

It’s a 500GB drive from Silicon Power. Been using it for years now. Still in great shape. Here’s what i did to fix it and get all the data back:

Step 1

Run diskutil list to find the ID of your drive. Mine is disk2s2(the last one):

MacBook-Pro:~ kavish$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk1         121.1 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +121.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            107.8 GB   disk1s1
   2:                APFS Volume Preboot                 45.9 MB    disk1s2
   3:                APFS Volume Recovery                510.1 MB   disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:       Microsoft Basic Data Kavish                  499.9 GB   disk2s2

Step 2

Now, you’ll have to boot into single-user mode. Leave your drive plugged in and turn off your mac. Turn it back on, and just after pressing the power button, press ⌘+s untill you see the apple logo.

Step 3

If you did everything right, you’ll get a root shell. Type the following command with your ID:

fsck_exfat -d YOUR_ID -f -y

Note: It’s gonna take some time to complete.

Step 4

When it’s done, run reboot.

“I never forget a face—but in your case, I’ll be glad to make an exception.” — Groucho Marx