Page 1 of 1

Serious problem with raspi-update

Posted: Sat Nov 23, 2013 11:26 pm
by pukster
I have noticed a serious problem whereby raspi-update corrupts the SD card. I discuss it here, but essentially I noticed across multiple SD cards, multiple raspis, and new installs of raspbian that if I call raspi-update, although it won't corrupt the actual OS, it corrupts the file system such that I can no longer make an image of it via dd. Can anyone else confirm this.

Re: Serious problem with raspi-update

Posted: Sat Nov 23, 2013 11:31 pm
by ShiftPlusOne
rpi-update or raspi-config?

Either way, neither of them do anything that would corrupt the sd card other than write to it. Which could mean you have a bad power supply or terrible luck with sd cards.

Re: Serious problem with raspi-update

Posted: Sun Nov 24, 2013 1:51 am
by pukster
ShiftPlusOne wrote:rpi-update or raspi-config?

Either way, neither of them do anything that would corrupt the sd card other than write to it. Which could mean you have a bad power supply or terrible luck with sd cards.
Darn I always get that wrong, yes I meant 'rpi-update'

Like I said, I have tried this on multiple SD cards, multiple raspis (yes even multiple power supplies) and on new and modified raspbian OS's. I want to know if anyone else has this 'problem'. I put that in quotes b/c the raspi still functions perfectly, and no one would be the wiser unless they tried to make a backup image of the sd card

Re: Serious problem with raspi-update

Posted: Sun Nov 24, 2013 2:06 am
by ShiftPlusOne
Sorry, it just doesn't add up. DD does not care about your filesystem. It should work regardless of what's on the card, unless the card is really truly messed up. Your filesystem could be random junk and corrupted data, dd would still work. Are you sure your sd card reader isn't the problem?

Re: Serious problem with raspi-update

Posted: Sun Nov 24, 2013 9:20 am
by markermoniker
On a card corrupted in this way, you can't dump a file from it. Can you dump more than 6.5GB onto it?
Essentially: you have demonstrated that you are unable to read. Are you also unable to write?

Your system is functional in every way except that you can't create an image of the SD card. Is that correct?

I may have experienced issues similar to yours, but I want to confirm before I jump to conclusions.

Re: Serious problem with raspi-update

Posted: Sun Nov 24, 2013 9:39 am
by 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)

Gordon

Re: Serious problem with raspi-update

Posted: Sun Nov 24, 2013 1:23 pm
by ShiftPlusOne
:? Really odd bug then. Didn't think it would be possible for something to happen to a card so that you wouldn't be able to read from it from another reader, without completely messing up the flash or controller on it. Ah well, learned something new then.

Re: Serious problem with raspi-update

Posted: Sun Nov 24, 2013 8:30 pm
by gordon77
gsh wrote: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)

Gordon
Do you mean there will be a new Raspian download, in the Downloads section in a couple of days ?

Re: Serious problem with raspi-update

Posted: Thu Nov 28, 2013 7:20 am
by pukster
Sorry for the late delay. I have been pulling my hair out trying to cross compile omxplayer (no luck yet). I will respond to your questions below.

Re: Serious problem with raspi-update

Posted: Thu Nov 28, 2013 7:23 am
by pukster
ShiftPlusOne wrote:Sorry, it just doesn't add up. DD does not care about your filesystem. It should work regardless of what's on the card, unless the card is really truly messed up.
Yes it is really truly messed up after every rpi-update
ShiftPlusOne wrote:Your filesystem could be random junk and corrupted data, dd would still work.
I don't know if I agree with that...
ShiftPlusOne wrote:Are you sure your sd card reader isn't the problem?
It *could* be a problem with the card reader, but I highly doubt that for various reasons, one being that this problem only presents itself when I apply a firmware update.

Re: Serious problem with raspi-update

Posted: Thu Nov 28, 2013 7:25 am
by pukster
markermoniker wrote:On a card corrupted in this way, you can't dump a file from it. Can you dump more than 6.5GB onto it?
Essentially: you have demonstrated that you are unable to read. Are you also unable to write?
I can write to it, and I do so regularly; when the SD card becomes corrupted, I simply overwrite it with one of the stable backup images I made in the past. In one case, the SD card was so badly corrupted that I did the old dd if=/dev/zero... trick
markermoniker wrote:Your system is functional in every way except that you can't create an image of the SD card. Is that correct?
Correct
markermoniker wrote:I may have experienced issues similar to yours, but I want to confirm before I jump to conclusions.
Confirmed

Re: Serious problem with raspi-update

Posted: Thu Nov 28, 2013 7:28 am
by pukster
gsh wrote: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)

Gordon
Hi. Well obviously using rpi-update is out of the question. I assume I would have to start from scratch if I go with the new raspbian image, correct (ie. reinstall MPICH, MPI4Py...)? I'll see if I can hand copy it.

Just to be clear, when you say "long continuous writes", is it because I am using dd to copy the image over to the sd card, or is it some big write happening during rpi-update? I assume it is the latter.

Re: Serious problem with raspi-update

Posted: Wed Mar 12, 2014 7:34 pm
by pizthewiz
Unfortunately, I am running into the same issue as reported by @pukster, on an 8GB Transcend Class 10 SD card. After dd'ing the latest wheezy image to the card, I can boot, configure and use it as per usual. When I run rpi-update the Input/output error occurs a while after it seems to be dealing with kernel_emergency.img and my card is left in a seemingly corrupt and non-booting state.
gsh wrote:
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 (…)
Hmm, the issue is occurring even after installing the 2014-01-07 wheezy image, might the necessary changes not have made it into that image?

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 2:17 pm
by coralnut
I'm having the same problem on a brand new SD card. Worked fine until I did an rpi-update, now the card works fine when I have it in the Pi, but dd backups fail with read errors.

Is there a fix that I can apply to get rid of the problem? I really don't like not being able to do backups.

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 2:44 pm
by RaTTuS
1) thread necro warning
2) why did you do an rpi-update - this is never needed nowadays unless you are specifically fixing something
3) go back to your previous backup
4) revert using rpi-update xxxx <- where that is the commit number

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 4:37 pm
by coralnut
sorry, it seems as if i have mis-spoken. I didn't actually do an rpi-update. I did a regular software update, which seems to have had the same result. not quite sure how to undo what's been done...

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 4:41 pm
by RaTTuS
read http://www.raspberrypi.org/forums/viewt ... 28&t=58151
then post a new thread detailing everything

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 4:51 pm
by coralnut
thanks for your help. i'm not exactly sure why you referred me to a thread for debugging boot problems, as the pi works just fine. the only problem is when it's SD card is removed to an external box for backup.

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 4:58 pm
by RaTTuS
well it is other problems then

the other system is a linux box and you dd the sdcard to create a backup ?
i.e.
sudo dd if=/dev/sd1 of=/images/backup bs=2M conv=sync,noerror
and this issues errors ?
if so, that means your sdcard is probably failing [YMMV]

make an rsync image of the filesystem on the other machine as a precaution

what does dmesg say [both on the RPi and other system]

also sudo fdisk -l

what about a new sdcard

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 5:38 pm
by coralnut
yes, I put the disk into a linux box and tried to use dd for backup, and dd began to issue errors. the pi has been functioning flawlessly.

interestingly, the SD card that i had previously been using in the pi had this problem, so i removed it, and did a clean install onto a brand new SD card. the new card is doing the same thing. if i take the cards out of the pi and format them, they behave appropriately (no r/w errors). it appears that they only have the problem when they have the pi firmware/os loaded onto them, and i try to do a backup using dd.

fwiw, i'm having the problem irrespective of whether i use raspbian or pidora. the problem happens with both. i understand that there used to be a firmware bug that caused this problem in raspbian, and it was fixed about a year ago. i'm wondering if the old firmware bug might still be in play in pidora.

btw the rsync idea was a good one. an rsync backup worked fine from the card reader that was sitting in the linux box. i haven't yet had a chance to put the card back and check the dmesg output.

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 5:41 pm
by DougieLawson
coralnut wrote:thanks for your help. i'm not exactly sure why you referred me to a thread for debugging boot problems, as the pi works just fine. the only problem is when it's SD card is removed to an external box for backup.
You can't remove the SDCard from a running system if the root filesystem is on a partition on the SDCard. That will crash your operating system.

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 5:57 pm
by coralnut
sorry if i gave you the wrong impression -- nobody's been removing SD cards from a powered-on system.

Re: Serious problem with raspi-update

Posted: Thu Feb 26, 2015 6:06 pm
by RaTTuS
if you are getting dd errors on a machine that is not the RPi then the firmware will not be affecting it
you can update the firmware on the pidora by taking the relevant file from a raspbian dist.