74

I've been looking around for a way to do this for a while, but I haven't been able to find the answer. I need to format my 2 GB SD card to FAT-32, but I don't see the option in Disk Utility.

If I select the SD drive (Apple SDXC Reader Media) and go to 'Erase,' I have the following format options:

  • Mac OS extended (Journaled)
  • Mac OS extended (Journaled, Encrypted)
  • Mac OS extended (Case sensitive, Journaled)
  • Mac OS extended (Case sensitive, Journaled, Encrypted)
  • MS DOS (FAT)
  • ExFAT

Doing the same, but selecting the SD card itself (in my case, NO NAME), I get all the same results, minus Mac OS X's with encryption.

I have read that selecting MS-DOS will chose between FAT-16 and -32, depending on the SD card's size. However, I have a 2 GB one.

Format:            MS-DOS (FAT16)
Owners Enabled:    No
Number of Folders: 0
Capacity:          1.98 GB (1,975,546,368 Bytes)
Available:         1.79 GB (1,789,296,640 Bytes)
Used:              186 MB (185,991,168 Bytes)  --> (I have already backed up)
Number of Files:   512

5 Answers5

133

If you're comfortable with using the Terminal, try this:

First, look at the partition table by running this command:

diskutil list

You should see something like this:

/dev/disk1
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                        *16.0 GB    disk1
1:                        EFI                         209.7 MB   disk1s1
2:                  Apple_HFS Example                 15.7 GB    disk1s2

The partition we want to change is /dev/disk1.

We want to change the device to an MBR-formatted FAT32 partition. To do that, run this command:

sudo diskutil eraseDisk FAT32 NAME MBRFormat /dev/disk1

where NAME is the name you want to give to the disk.

As mentioned in the comments, you cannot put square brackets into the volume's name lest things mess up. To avoid having everything fail, simply ensure that there are no square brackets in the FAT32 volume's new name.

Note: The NAME can fail if not UPPERCASE in many cases.

Alex Plumb
  • 1,826
22
sudo diskutil eraseDisk FAT32 [NAME] MBRFormat /dev/disk1

Where [NAME] must be written in CAPITAL letters; otherwise, this will not work.


As mentioned in the comments, ensure that you use a tool such as diskutil to check which disk you are formatting. In the example above, the disk /dev/disk1 is being formatted. After finding the desired partition through a method such as calling diskutil list (This command lists the partitions on the system. See other answer for details), replace dev/disk1 with the desired partition.

pecuequin
  • 221
5

If you tried this:
$diskutil eraseDisk FAT32 MYDISKLABEL MBRFormat /dev/disk1

But receive this error:
FAT32 does not appear to be a valid file system format Use diskutil listFilesystems to view a list of supported file systems

Then this answer may help you.  But please note:

  • This is an alternate solution for older Apple Mac versions where FAT32 as the filesystem type does NOT WORK as per the error above.  
  • I am not sure which "older" versions produce the error, but it does occur in Snow Leopard 10.6.8 with diskutil version dated 15 May 2009.
  • The error may occur from Mac OS Leopard 10.5 to Yosemite 10.10.  
  • This solution is not relevant for newer Mac OS versions, perhaps El Capitan 10.11 and onwards.
  • In the following examples, /dev/disk1 points to the SD card (device).  You need to determine what is the pointer to your device.
  • I will not elaborate on every bit of information, just what changes need to be made to your command; e.g. you should know from other answers when to use sudo, how to identify your device, how to unmount your device, how to specify the label and how to verify that the disk is formatted correctly.

Command Line Syntax:
diskutil eraseDisk filesystem disklabel MBRFormat device


Solution:
Find the correct filesystem alias by listing all available options:

$diskutil listFilesystems

In the output table you will see that there are aliases defined by "(or) something" but there is no alias for the "FAT32" filesystem.  Thus, you must specify the case-insensitive full name "ms-dos fat32".

Command:
$diskutil eraseDisk "ms-dos fat32" mydisklabel MBRFormat /dev/disk1

rwarvi
  • 57
  • 1
  • 5
1

For me, none of the posted answers worked. What worked instead was

diskutil eraseDisk JHFS+ UntitledUFS /dev/disk2

and then from the Disk Utility UI format it again to FAT32.

rwarvi
  • 57
  • 1
  • 5
gderaco
  • 111
  • 2
-1

Try this:

diskutil eraseVolume "ms-dos fat32" PARTNAME /dev/disk***XsY
gustavo@iMac-de-Gustavo ~ % diskutil list

/dev/disk1    
#:                       TYPE NAME                    SIZE       IDENTIFIER     
0:     FDisk_partition_scheme                       
*2.0 GB     disk1     
1:                 DOS_FAT_16 NO NAME                 2.0 GB     disk1s1

gustavo@iMac-de-Gustavo ~ % diskutil eraseVolume "ms-dos fat32" FAT32 /dev/disk1s1

Started erase on disk5s2 (FAT) 
Unmounting disk 
Erasing 512 bytes per physical sector /dev/rdisk5s2: 15853288 sectors in 1981661 FAT32 clusters (4096 bytes/cluster) bps=512 spc=8 res=32 nft=2 mid=0xf8 spt=32 hds=255 hid=411648 drv=0x80 bsec=15884288 bspf=15482 rdcl=2 infs=1 bkbs=6 
Mounting disk 
Finished erase on disk1s1 (FAT32)

gustavo@iMac-de-Gustavo ~ % 

Easy like that ;)

Giacomo1968
  • 58,727