Linux – How to Format a microSD Card That Cannot Be Formatted

formatlinuxmicro-sd-cardpartitioningsd card

I have a 16GB SAMSUNG EVO microSD card that I was using on RaspberryPi 2 with NOOBS installed on it.
I tried to format it in every way possible:

  • from Windows 10 with SDFormatter;
  • from Windows 10 with partition manager;
  • from Windows 10 I tried to overwrite it with Win32 Disk Imager;
  • from Linux (elementaryOS) using GParted (I tried to delete every partition but I get an error that says that is impossible to inform kernel and I also tried to create a new partition table, but everything remains untouched);
  • from Linux (elementaryOS) terminal using the command sudo dd if=/dev/zero of=/dev/mmcblk0.

The thing is that from the NOOBS menu, I managed to delete operating systems on the SD adding only a data partition, but when I put it back on PC I cannot do nothing as before.

The other strange thing is that with Win32 Disk Imager I can restore successfully the backup of the SD that I made before trying to format it.

If it matters on the SD I had installed OSMC and Raspbian and I extended the file systems to occupy the unused space from Raspbian options.

I don't know what else to try… any suggestions?

Best Answer

Windows Disk Management can't work with every possible scenario, but I find that diskpart is quite useful where you want to completely erase all partitions on cards like this. This guide to using the diskpart 'Clean' command would be your best bet on Windows in my opinion: https://www.sevenforums.com/tutorials/52129-disk-clean-clean-all-diskpart-command.html

Otherwise, if the card is faulty you may need to replace it.

Related Question