How do you format a 2 GB SD card to FAT32 (preferably with Disk Utility)?

58

22

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

Matt Reynolds

Posted 2013-01-03T17:42:21.690

Reputation: 710

Seems like disk numbers greater than 1 should be used in all answers to this lest users erase their main drive. I know most main drives are disk0s but still, let's add a margin of safety – JohnAllen – 2016-02-29T17:08:15.490

Answers

113

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.

Alex Plumb

Posted 2013-01-03T17:42:21.690

Reputation: 1 616

1If the SD card is write-protected the result is a rather misleading error message. Perhaps you can include that in the answer? – Peter Mortensen – 2015-12-25T18:14:43.407

you might suggest usage of diskutil info <diskname> as a way to verify the correct disk, the output from diskutil list can be pretty obscure – lfender6445 – 2018-12-20T01:26:35.453

Please don't use /dev/disk1 as your example, as this is the Macbook hard drive. No I didn't just format it, but someone might. – geotheory – 2019-07-03T10:07:52.240

Also volume name needs to be ALL CAPS. Sometimes it's just been a long day... – hashlock – 2019-09-15T00:33:53.617

When I did the 'diskutil list' command, I got the following for disk1:
/dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *2.0 GB disk1 1: DOS_FAT_16 NO NAME 2.0 GB disk1s1

With the second command, I got: (In next comment) – Matt Reynolds – 2013-01-03T18:38:05.197

Started erase on disk1 Unmounting disk Creating the partition map Waiting for the disks to reappear Formatting disk1s1 as MS-DOS (FAT32) with name [NAME] newfs_msdos: [NAME]: bad volume name Mounting disk Could not mount disk1s1 with name (null) after erase Error: -69832: File system formatter failed

(Yeah, I left it as [Name] cuz I was in a hurry) – Matt Reynolds – 2013-01-03T18:41:08.720

And it doesn't show up in finder, and plugging it in brings up a window saying "The disk you inserted was not readable by this computer" and the buttons "Initialize," "Ignore," and "Eject." – Matt Reynolds – 2013-01-03T18:44:50.510

Nevermind, I figured it out. I tried to repair, which failed, so I made a new partition, deleting the old one. After that, I re-tried your idea, and it worked! – Matt Reynolds – 2013-01-03T19:48:00.743

3I've learned something today: if you try to put square brackets into a FAT32 volume name, things will break badly. – Alex Plumb – 2013-01-03T20:08:36.177

Ah. I guess that's where things went wrong. Thanks! – Matt Reynolds – 2013-01-04T15:43:33.943

20

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

Posted 2013-01-03T17:42:21.690

Reputation: 201

11This answer is pretty risky if you haven't first used some tool like diskutil to determine which device your SD card is. On my machine, the SD card is /dev/disk2. Good thing I didn't follow this answer blindly! – LarsH – 2015-01-19T16:48:03.247

1If the SD card is write-protected the result is a rather misleading error message. Perhaps you can include that in the answer? – Peter Mortensen – 2015-12-25T18:15:38.343

3

This answer is appended as a solution for all those 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:

  1. Close any applications and exit any terminal prompt accessing the disk.
  2. If you want to do everything manually then unmount the disk using:
    $diskutil unmountDisk /dev/disk1
    However, diskutil automatically attempts to unmount it.
  3. 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

rwarvi

Posted 2013-01-03T17:42:21.690

Reputation: 31

this save me for long day of reaserach you deserve the upvote – Espoir Murhabazi – 2017-11-19T09:12:14.903

Hm, FAT32 worked for me. MacOS Catalina 10.15.2. – kelin – 2020-01-14T12:59:25.490