6

I regularly make ISO images of my SD cards (for many reasons), and I have noticed that whenever I issue the rpi-update command, I can no longer make these images, instead getting this error:

sudo dd if=/dev/sdb of=/home/user/Documents/raspi/images/raspi1.8.iso bs=1M
dd: reading `/dev/sdb': Input/output error
6227+1 records in
6227+1 records out
6530007040 bytes (6.5 GB) copied, 394.699 s, 16.5 MB/s

I suspect it has something to do with that fact that the firmware is actually stored on the SD card with the Raspberry Pi. Can anyone else confirm this (the problem that is)? I have four more Raspberry Pi'es coming in. Once they do I will take a fresh copy of Raspbian, make an image of it, run raspi-update and try to make an image of it again. If that craps out too, then it will be official that it is a serious problem.

In response to the comments, I should mention that the SD card is not the issue here. I have a stable ISO image, let's call it raspi.1.0.iso, and two SD cards. If I copy the image onto either of two SD cards, they both work. When I issue the rpi-update command on either of the SD cards, I can no longer make an image of those SD cards. However, I can still copy raspi.1.0.iso over to the now corrupted SD card.

Lenik asked a few questions, and I will update them here as I go. Some of them require new hardware, hence why I can't answer them all in one sitting.

  1. Does the error always happen at the same 6.5 GB (6530007040) offset for different sized SD cards? PROBABLY NOT
  2. Does the error always happen at the same 6.5 GB (6530007040) offset even for same sized SD cards? NO
  3. Have you tried different power supply? YES
  4. Have you tried to find out which file lives at the place you get your error from? I DON'T KNOW HOW
  5. Have you tried with a brand new Raspbian OS? YES

Just to be perfectly clear, I just received a brand new Raspberry Pi, with a brand new SD card. I used that Raspberry Pi, and that SD card and a completely different power supply to execute the rpi-update command.

9
  • I'd say wait for the new pis and test. Commented Nov 9, 2013 at 12:16
  • have you tried a different SD card?
    – lenik
    Commented Nov 9, 2013 at 14:57
  • @lenik will update question
    – puk
    Commented Nov 9, 2013 at 23:22
  • 1. have you tried different size of SD card, does the error happens at the same 6.5GB offset? 2. have you tried different power supply? maybe the update process temporarily consumes more power, resulting in failed SD write, that shows up as a i/o error afterwards. 3. have you tried to find out which file lives at the place you get your error from?
    – lenik
    Commented Nov 10, 2013 at 23:36
  • 1) No, Haven't checked 2) No 3) No
    – puk
    Commented Nov 11, 2013 at 0:23

3 Answers 3

2

To all you *tongue in cheek* haters and doubters, this is not an SD issue, but rather a faulty operating system issue. As mentioned here:

user gsh

Sounds like you are finding the problem we've recently fixed... Unfortunately you need rpi-update to update your sdcard!!!

The problem is only really seen when you do long continuous writes to the SDCard and that's what something like dd or big copies to the FAT sector does...

There are two solutions to this, first is to wait for a couple of days for a new Raspbian image containing the latest firmware or to hand copy the start.elf and kernel.img from the github tree (at github.com/raspberrypi/firmware/boot)

2
  • Sorry about the mistaken flag - your intro made it look like you were taking others to task and posting clarification that belonged in a comment or the body of your question, rather than actually answering your question - but I see you quoted passage does answer it do a degree. Commented Jan 28, 2014 at 18:03
  • @ChrisStratton no worries
    – puk
    Commented Jan 29, 2014 at 3:17
1

This is almost certainly an SD card problem, judging from the presence of an input/output error. The SD card corruption problems with the Raspberry Pi pretty well destroy the card: simply rewriting the image to the same card generally doesn't work. (Or it seemingly works for a while, and then gets much worse.)

Apparently, having a very good power supply is one solution. I've switched to using a USB stick for my main hard disk, using the SD card only for the boot partition. Then the Raspberry Pi only uses the SD card for a second during boot, and then interacts mainly with the (much better power-managed) USB ports. See HOWTO: Move the filesystem to a USB stick for a description of how to set up a USB root.

You can then easily make an image of your installed USB drive, or just clone it from one stick to another using rsync...

1
  • Nope! it's a raspbian problem. See here (gsh's answer)
    – puk
    Commented Jan 7, 2014 at 4:17
0

Seconding sdenton4; it's a card problem, for sure.

To check this, I took the system card from oldest Raspberry Pi. This has been running for over a year. It's had numerous OS and firmware updates, and had a generally hard time living as my workshop controller. If any card's going to have a problem, it'll be this one. So, on another computer, I did:

$ sudo dd if=/dev/sdc of=raspi.iso bs=1M
30959+0 records in
30959+0 records out
32462864384 bytes (32 GB) copied, 2059.55 s, 15.8 MB/s

There are no complaints in my dmesg log. The card is a relatively cheap Transcend Class10 32GB.

I think you may have a faulty card. If you can bear to, run it through the official SD Association SD Formatter and give it a low-level format.

Making full-media images of your card may not be the best way of backing up your stuff. I usually just use rsync to save off /home, tar to get a few choice files in /etc, and if I can remember how, I dump a list of the installed Debian packages. Everything else can be set up pretty quickly from the command line.

gsh's answer from the forum that you repeatedly refer to is from a couple of months ago. Any issue that there was has been fixed, and the firmware update doesn't write to the card in any special way that would cause problems.

1
  • 1
    No promises as I am very busy. However, I will say that I have had this problem across 5 different cards, using different card readers and different computers
    – puk
    Commented Jan 29, 2014 at 3:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.