Can't back up SD card with dd, complains "Input/Output Error"

11,688

It is possible that your raspi simply does not hit badblock on your SD card, and that's why it appears to work fine.

You can dd image and ignore bad blocks by adding conv=noerror parameter. This will replace bad blocks with zeros, and if you dd that image back to another same-size card, it should work the same.

Share:
11,688
puk
Author by

puk

Updated on June 28, 2022

Comments

  • puk
    puk almost 2 years

    I have successfully backed up my SD card twice by issuing the following command

    sudo dd if=/dev/sdb of=/home/user/Documents/raspi/images/raspi1.v2.iso bs=1M
    

    However, now it is giving me the following error:

    dd: reading `/dev/sdb': Input/output error
    3027+1 records in
    3027+1 records out
    3174977536 bytes (3.2 GB) copied, 200.723 s, 15.8 MB/s
    

    Looking around the net, this seems to indicate a corrupted SD card. However, my raspi (which I runs off of this SD card) runs fine (ish) and Disk Utility claims that the sd card is not corrupted.

    Is there another way I can find out why dd is complaining, if the card is corrupted, and if so, how to fix the SD card.

    UPDATE:

    I gave up trying to run dd on the SD card, but I did figure out what was corrupting my SD card, it was the updating of the Raspi firmware as specified on this site

  • puk
    puk over 10 years
    I already tried that and it still does not work. It gives more or less the same error, but many more times
  • mvp
    mvp over 10 years
    Hmm. Looks like it is time to buy new SD card. You can try to force remapping bad sectors by sudo dd if=/dev/zero of=/dev/sdb bs=1M. This may give you working card, but it probably won't last long
  • puk
    puk over 10 years
    This problem is actually ongoing, and I have tried it on different raspis, new raspis, new raspbians, and on new SD cards.