How do you format a 2 GB SD card to FAT32 (preferably with Disk Utility)?
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.
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.
This answer is appended as a backwards compatible solution for older Apple Mac versions, such as Snow Leopard 10.6.8, where "FAT32" as the filesystem type does NOT work as per the example below:
$diskutil eraseDisk fat32 mydiskname MBRFormat /dev/disk1
fat32 does not appear to be a valid file system format Use diskutil listFilesystems to view a list of supported file systems
The internal command is:
diskutil eraseDisk filesystem disklabel MBRFormat device
where device is determined to be your SD Card using the command diskutil list
.
Find the correct filesystem alias by typing this in Terminal:
$diskutil listFilesystems
Formattable filesystems These file system personalities can be used for erasing and partitioning. When specifying one as a parameter to a verb, case is not considered; also, diskutil allows certain aliases which are themselves case-insensitive. ------------------------------------------------------------------------------- PERSONALITY USER VISIBLE NAME ------------------------------------------------------------------------------- ExFAT ExFAT Free Space Free Space (or) free MS-DOS MS-DOS (FAT) MS-DOS FAT12 MS-DOS (FAT12) MS-DOS FAT16 MS-DOS (FAT16) MS-DOS FAT32 MS-DOS (FAT32) HFS+ Mac OS Extended Case-sensitive HFS+ Mac OS Extended (Case-sensitive) (or) hfsx Case-sensitive Journaled HFS+ Mac OS Extended (Case-sensitive, Journaled) (or) jhfsx Journaled HFS+ Mac OS Extended (Journaled) (or) jhfs+
In the output above you will see that there are aliases defined by "(or) something" but there is no alias for the FAT32 filesystem. You must specify the full name "ms-dos fat32" regardless of case.
Therefore, for an SD card connected as /dev/disk1, the correct procedure is:
- Close any applications and
exit
any terminal prompt accessing the disk. - If you want to do everything manually then unmount the disk using:
$diskutil unmountDisk /dev/disk1
However, diskutil automatically attempts to unmount it. - Enter the following command, specifying your disk label and device appropriately:
$diskutil eraseDisk "ms-dos fat32" mydiskname MBRFormat /dev/disk1
Output is:
Started erase on disk1 Unmounting disk Creating partition map Waiting for disks to reappear Formatting disk1s1 as MS-DOS (FAT32) with name mydiskname Finished erase on disk1
Finally, check the result using diskutil list
:
$diskutil list /dev/disk1
/dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *1.0 GB disk1 1: DOS_FAT_32 MYDISKNAME 1.0 GB disk1s1