I tried with gparted, it didn't work. I found a SDFormatter, tool for windows that did the full erase.

I have a SD card and want to install Debian onto it. The dd process takes about 45 minutes, after that I quit it. In my Windows machine, it shows up in drive list but there's also an undefined error while try formatting or even opening. gparted just tells me

/dev/mmcblk0: unrecognised disk label

I issued

dd if='deb.iso' of=/dev/mmcblk0 bs=512k
dd: error writing „/dev/mmcblk0“: I/O error
0+1 data in
0+0 data out
copied 0 Bytes (0 B), 10,098 s, 0,0 kB/s

After that I tried

root@kali:~# lsblk -o NAME,FSTYPE,MOUNTPOINT,SIZE,RO
sda                       465,8G  0
├─sda1  ext4   /          450,1G  0
├─sda2                        1K  0
└─sda5  swap   [SWAP]      15,7G  0
sr0                        1024M  0
mmcblk0                    29,5G  0

mmcblk0 is the one i have problems with. Last,I tried

root@kali:~# mkdosfs -F 32 -v /dev/mmcblk0
mkfs.fat 3.0.26 (2014-03-07)
/dev/mmcblk0 has 4 heads and 16 sectors per track,
hidden sectors 0x0000;
logical sector size is 512,
using 0xf8 media descriptor, with 61896704 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 32 sectors per cluster.
FAT size is 15105 sectors, and provides 1933326 clusters.
There are 32 reserved sectors.
Volume ID is 2df52746, no volume label.
mkdosfs: failed whilst writing reserved sector 

I have absolutely no idea why it won't work.

  • I/O error does not necessarily mean that, I can access my SD card through mobile phone but the port is not being mounted on Ubuntu. – user176923 Jun 27 '16 at 10:07
dd: error writing „/dev/mmcblk0“: I/O error

“I/O error” (short for “input/output error”) means that there was a problem accessing a hardware. When you get this on a storage medium, it means that your storage medium is dead or dying, or you have a loose wire or underpowered peripheral or some other hardware problem.

I/O error from an SD card means that it's dead. That's why no software lets you format it. The card isn't able to store data any more. Some of its area might still be usable, but it's missing some of the bits.

Given the quality of card readers, it's possible that your card reader is broken and the card would work on another reader. But that's a rarer scenario, don't count on it.

You can't fix an SD card. Throw the SD card away and use a working one.

  • 1
    I had the same problem with my old asus laptop builtin card reader, the card was working on Windows (different machine) and in Camera, so I've used external card reader and the card worked fine. – jcubic Feb 10 '18 at 10:09
  • But I had problem in copy one file so maybe SD card was damaged after all. – jcubic Feb 10 '18 at 15:40

A broken disk label is a big issue for a filesystem. I hope you have nothing important on that card that you can't copy over, because these next instructions effectively give you information on how to perform a total format of the device.

Generally, there is a header at the superblock of the device (generally the start of it), and this header describes all of the partitions present on the device. Frankly, this label is broken (according to your error message). What you will need to do is make a new partition table to solve this issue.

I prefer to use a utility called 'gparted' for this, but you can use alternatives like regular 'parted', 'testdisk', or 'testdisk' derivatives for this. In 'gparted', open the 'GParted' tab and refresh devices. After this is complete, there should be a dropdown menu on the right-hand-side that lists your SD card, hard drives, and basically any other long-term storage medium that you may have attached at the time. Select your SD card from this menu (I do not know the path name for the SD card ATM, sorry). Open up the device tab, and you should see a button that says 'Create Partition Table...'. The other option, 'Attempt Data Rescue...', shouldn't be important right now, but I will explain in comments if you'd like. Anyway, go ahead and create that partition table. This will delete the old partition table and create a new one in its place at the superblock. You should probably choose the 'MPT' type label if you're planning on putting the SD card into an MS-DOS computer, or choose it generically. After you've done this, go back to the screen where the bars used to be. Right click on the greyed-out bar and select 'New'. Now you can format the SD card to whatever filesystem type that you'd like, within reason. I suggest 'ext4' for Linux-only usage and 'fat64' for MS-DOS and Linux capability.

Congratulations! You just performed a complete format of your SD card manually! You should now be able to use 'dd' to make a bitwise clone of the Debian image. If you can't, try to verify that the SD card and Debian image aren't corrupted (and possibly try again).

  • 2
    I really hope that I didn't just post a bunch of useless information. – Mr. Minty Fresh Oct 15 '15 at 0:07
  • I am just "Attempt Data Rescue", just would like gparted to be more verbose :/ – Aquarius Power Mar 18 '17 at 1:13
  • Tried using gparted and still was getting I/O error message....but then...tried a different card reader, and the card formatted fine. Am now using that sd card no problem. Always, always, always check your card reader to make sure it is up to snuff. – portsample May 9 '17 at 16:14

For some weird reason, if your tiny switch on the side of the card is marking it as read only, Ubuntu always returns the error you mentioned above. Try switching it to the other position and read it again... worked for me.

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.