Finally figured out how to format a memory stick for optimal compromise between compatibility and file sizes.

The goal is to be able to stick this memory stick in anything from the last 15 years and be able to load files on and off. The implementation idea was to have two partitions, one FAT32 for compatibility with everything, and one ExFAT for wide compatibility allowing larger files.

The mistake I made last time was using a GUID-based partition map, which rules out compatibility with older hardware which uses a BIOS. This can be rectified by using the older Master Boot Record partition map, which has some restrictions, but nothing particularly relevant in this case.

I had no end of problems trying to achieve this with the Gnome Disks tool and GParted, and on Mac OS 10.11 it’s not possible in the Disk Utility GUI. It is, however, very easy using the command line Disk Utility tools.

Firstly, run

diskutil list

to find out the descriptor for the device you want to format (e.g. /dev/disk2, referred to in future examples as /dev/diskX), then

diskutil unmountDisk /dev/diskX

to unmount it in preparating for formatting. I’m formatting a 64GB flash drive with 62.1GB actual capacity into two equal portions, so my command ends up looking like this:

diskutil partitionDisk /dev/diskX MBR ExFAT NAME_OF_FIRST_PARTITION 31.1g FAT32 NAME_OF_SECOND_PARTITION 0g

where the format is pretty self explanatory:

volume partition_map partition_1_format partition_1_name partition_1_size partition_2_format partition_2_name partition_2_size

The size of partition two is given as 0g, which results in the rest of the available space being taken.

A list of available filesystems for formatting can be browsed with:

diskutil listFilesystems

I just tested the newly formatted universal memory stick with a computer with which it previously didn’t work, and it worked perfectly, so I’m confident that this approach achieves my original goal.

— 7 comments 1 reposts 9 likes