Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 986
puk Avatar asked Oct 19 '13 19:10

puk


1 Answers

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.

like image 89
mvp Avatar answered Sep 21 '22 06:09

mvp