1

I formatted an external hard disk on my ubuntu linux system with exfat.

  1. First I installed the exfat utilities: sudo apt-get install parted exfat-utils
  2. Then I partitioned the disk with a mbr boot record and one primary partition using parted
  3. Finally I formatted the partition with mkfs.exfat -n ShareDisk /dev/sdX1

Then I copied about 300 GB of data onto the disk. Everything worked fine on my linux machine - so far so uneventful.

However, when I plug the disk into my Mac, it says it cannot handle that file system and proposes to initialize or eject it. Now I explicitly chose exfat so the disk would work with any operating system and I have been successfully using exfat formatted disks on my Mac before.

4

I just spent the better part of a day solving this problem. Apparently, Mac OS is quite picky about how the partition was created and with which flags. I was able to solve the problem by

  1. Converting the boot record to GPT using sudo gdisk /dev/sdx as suggested here. Just exit gdisk right away with w. It will warn about overwriting your drive. In my case answering with Y worked fine without losing data. Please make sure that you have backed up your date before doing this (no backup, no pity).
  2. Setting the msftdata data on the exfat partition (in my case partition number 1): sudo parted /dev/sdX and then set 1 msftdata on.

Afterwards my Mac opened the partition without complaints.

0

Just to complement the answer from Thawn,

For me simply using their solution was not enough.

When I created my partitions using fdisk, I first had to create a create a new empty GPT partition table, then the partition, then the filesystem, and then follow the steps they suggested.

The entire process would be (beware as the steps described below will delete any data in the existing partitions):

Step 0: Backup any data on the disk that you want to save.

  1. Discover the name of the device (in my case /dev/sdb)

    sudo fdisk -l
    
  2. Run fdisk on the device

    sudo fdisk /dev/sdb                     # replace b by your device letter.

  3. Delete existing partitions (repeat for as many partitions as you have)

    d
    
  4. Create the new empty GPT partition table

    g
    
  5. Create a new partition

    n
    
  6. Choose options.  I chose all the default options for the new partition
  7. Write the changes to the device

    w
    
  8. Exit fdisk

    q
    
  9. Write the new exFAT filesystem

    sudo mkfs.exfat -n my_label /dev/sdb1

  10. Convert the boot record to GPT (Thawn's answer)

    sudo gdisk /dev/sdb
    
  11. Just write right away

    w
    
  12. Accept that you might lose data (backup first)

    Y
    
  13. Quit gdisk

    q
    
  14. Set the msftdata data on the exFAT partition (also taken from Thawn's answer).  Since we have only one partition, apply the command to partition 1

    sudo parted /dev/sdb
    set 1 msftdata on
    q
    
  • Assuming you already have an exFAT partition(as the question does), your steps 1-9 are unnecessary. On the contrary, especially creating a new partition will certainly delete existing data, which does not (necessarily) happen when you follow my answer. – Thawn Mar 3 at 11:58
  • You are correct, however when I created the partitions using fdisk (without creating the new empty GPT partition table) and wrote the exFAT fs to it, simply doing steps 10-14 didn't do the trick, so I posted the reply in case someone faces the same issue as I did. I couldn't comment on your reply because don't have enough reputation. – jpnadas Mar 3 at 18:46
  • Maybe add this information to your answer. Also I suggest to add a note that creating the new exFAT filesystem will delete all existing data. It never hurts to be crystal clear when it comes to potential data loss ;-) – Thawn Mar 3 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.