Can't reformat SD card (Yosemite)

I have a 2 GB SD card that I can't reformat. It seems pretty corrupted.

If I go into Disk Utility, I get these various error messages for each option:

  • Repair Disk:

    Disk Utility can’t repair this disk.

  • Erase (with Format "MS-DOS (FAT)"):

    Volume Erase failed with the error: Couldn’t modify partition map.

  • Set number of partitions to 1 and Apply:

    Partition failed with the error: Couldn’t open device.

According to Finder, I have permission to both read and write, and almost 100% of the space is available. However, if I try to copy any files on, I get an error message claiming there is not enough free space.

Any advice on how to fix this disk?


Solution 1:

Get drive name

diskutil list

then try

diskutil unmountDisk force /dev/DRIVENAME

Then format

diskutil eraseDisk JHFS+ Emptied /dev/DRIVENAME

or

diskutil eraseDisk FAT32 NEWNAME /dev/DRIVENAME

Solution 2:

I had the same exact problem. Format your card using this application: https://www.sdcard.org/downloads/formatter_4/index.html

Worked perfect for me.

Cheers.

Solution 3:

Does it have a lock switch on the side? If the card is not corrupted, it could help to slide the lock switch several times.

Solution 4:

I had the same issue on an iMac, Michelle mentioned using an external SD reader solved her problem so I figured it didn't make sense for it to be an OSX related problem. tried the tape, tinfoil and mid-position tricks to no avail. Some people go so far as to say there's a "light beam" inside the slot that reads the lock slider in the cards.

It came down to either buying a USB SD reader or opening the iMac to extract and service the reader part itself. Then I used a led light to see inside the slot itself and it was all in fact just pins. a pin is pushed when the card slider is in “lock” position preventing the OS from writing. I used tweezers to scrub inside the lock recess in the iMac slot, plugged the SD afterwards and it worked, it's writable again. might have been jammed with dirt and dust.