How to format multiple exFAT partitions on USB drive?

Solution 1:

To format an ExFAT partition, unmount the partition and use (sudo) newfs_exfat [options] /dev/disk*s*. Check man newfs_exfat for the options.

The default FAT-size is 32bit, so you don't have to (or more precisely: you can't easily) specify the -F option.

Typically the Terminal commands should look like this:

diskutil list #to get the disk identifier of the exFAT partition
diskutil unmount /dev/diskxsy
sudo newfs_exfat -v Name /dev/diskxsy

Solution 2:

You can also use diskutil directly:

diskutil eraseVolume ExFat NewVolume /dev/diskXsY
                     |     |
                     ^ Format of partition
                           ^ Name of the new volume

You can also re-partition a whole disk all in one command:

diskutil partitionDisk /dev/diskX 2 MBR \
        ExFAT NewVolumeA 100M \     |
        ExFAT NewVolumeB R          |
        |     |          |          ^ Partition scheme, can be GPT or APM too
        ^ Format of partition
              ^ Name of the new volume
                         ^ Size of the volume, R means the rest.