2

I'm following the instructions in Creating a bootable Clonezilla dual partition USB device but using my Mac laptop running El-Capitan.

I managed to create an MBR partition table and two partitions on the external USB drive using OSX' fdisk utility but I failed to find a way to format the existing partitions to ExFAT.

All the references I found so far point to diskutil eraseDisk or suggest using Windows or Linux for that, but I don't have access to bare-iron servers with these OS's and failed to access the unformatted USB drive from VirtualBox virtual machines on my laptop.

So, the question is - "Is there a way to execute the equivalent of mkfs.vfat -F 32 /dev/sdb1 on OS X?"

3

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
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .