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?
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