68

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
1
  • 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
    Feb 29 '16 at 17:08
126

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.

11
  • 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) Jan 3 '13 at 18:38
  • 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) Jan 3 '13 at 18:41
  • 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." Jan 3 '13 at 18:44
  • 3
    I've learned something today: if you try to put square brackets into a FAT32 volume name, things will break badly.
    – Alex Plumb
    Jan 3 '13 at 20:08
  • 1
    If the SD card is write-protected the result is a rather misleading error message. Perhaps you can include that in the answer? Dec 25 '15 at 18:14
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.

2
  • 12
    This 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
    Jan 19 '15 at 16:48
  • 1
    If the SD card is write-protected the result is a rather misleading error message. Perhaps you can include that in the answer? Dec 25 '15 at 18:15
4

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

7
  • 1
    this save me for long day of reaserach you deserve the upvote Nov 19 '17 at 9:12
  • Hm, FAT32 worked for me. MacOS Catalina 10.15.2.
    – kelin
    Jan 14 '20 at 12:59
  • This did get around message "Unknown partition scheme: MYDISKNAME ". After I get mydiskname does not appear to be a valid volume name for its file system (high sierra). gderaco's answer worked though, or using the name in all capitals like MYDISKNAME
    – rogerdpack
    Apr 29 at 0:31
  • diskutil eraseDisk "ms-dos fat32" mydiskname MBRFormat /dev/disk1 fails but diskutil eraseDisk "ms-dos fat32" MYDISKNAME MBRFormat /dev/disk1 succeeds :)
    – rogerdpack
    Jun 4 at 15:35
  • @rogerdpack, so that I can improve my answer, please send me your OS X version and diskutil version number/date from the man page.
    – rwarvi
    Jun 18 at 6:00
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.