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

1

7

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

Undervest answered 19/10, 2013 at 19:28 Comment(0)
A
3

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.

Abstergent answered 19/10, 2013 at 19:34 Comment(3)
I already tried that and it still does not work. It gives more or less the same error, but many more timesUndervest
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 longAbstergent
This problem is actually ongoing, and I have tried it on different raspis, new raspis, new raspbians, and on new SD cards.Undervest

© 2022 - 2024 — McMap. All rights reserved.