Mike's PBX Cookbook

Formating FAT16

Format a Compact Flash drive to the older FAT 16 (required for come older hardware), using Mac OS X and the terminal application.

Open the Terminal, and type diskutil list to list the connected devices.

$ diskutil list
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            NONAME                 *1.0 GB     disk2 

Identify the external drive, and use its /dev/disk number in the following command:

diskutil partitiondisk /dev/disk2 1 MBR "MS-DOS FAT16" "NONAME" 0B

The arguments are as follows:

* list the formattable partition types with the command: diskutil listFilesystems, lots are supported!

For example:

$ diskutil partitionDisk /dev/disk2 MBR "MS-DOS FAT16" "NONAME" 0B
Started partitioning on disk2
Unmounting disk
Creating the partition map
Waiting for the disks to reappear
Formatting disk2s1 as MS-DOS (FAT16) with name NONAME
512 bytes per physical sector
/dev/rdisk2s1: 2001344 sectors in 62542 FAT16 clusters (16384 bytes/cluster)
bps=512 spc=32 res=1 nft=2 rde=512 mid=0xf8 spf=245 spt=32 hds=128 hid=2 drv=0x80 bsec=2001886
Mounting disk
Finished partitioning on disk2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 GB     disk2
   1:                 DOS_FAT_16 NONAME                  1.0 GB     disk2s1
$

A specific size:

To create a specific size drive, eg 64 Meg:

  1. Two partitions, noname1 (64meg) and noname2 (remaining space):

    diskutil partitionDisk /dev/disk2 MBR "MS-DOS FAT16" "NONAME1" 64M "MS-DOS FAT16" "NONAME2" 0B

  2. One 64meg partition, the remainder as free space (free space still requires a name in quotes):

    diskutil partitionDisk /dev/disk2 MBR "MS-DOS FAT16" NONAME 64M free "" 0B
Use diskutil list to display the partition scheme:
$ diskutil list /dev/disk2
/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 GB     disk2
   1:                 DOS_FAT_16 NONAME                  64.0 MB    disk2s1

When finished, unmount the disk (or "eject" it in the finder):

$ diskutil unmountdisk /dev/disk2
Unmount of all volumes on disk2 was successful

Alternate method:

Unmount the disk (not eject), and use the following command to reformat the first partition:

newfs_msdos -F 16 /dev/disk2s1

The F option specifies the FAT type, which can be 12, 16, or 32. Type man newfs_msdos for other option details.

Home » Other » Dosfat16