pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Serious problem with raspi-update

Sat Nov 23, 2013 11:26 pm

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.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5860
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Serious problem with raspi-update

Sat Nov 23, 2013 11:31 pm

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.

pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Re: Serious problem with raspi-update

Sun Nov 24, 2013 1:51 am

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

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5860
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Serious problem with raspi-update

Sun Nov 24, 2013 2:06 am

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?

markermoniker
Posts: 5
Joined: Tue Nov 19, 2013 2:22 am

Re: Serious problem with raspi-update

Sun Nov 24, 2013 9:20 am

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.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1423
Joined: Sat Sep 10, 2011 11:43 am

Re: Serious problem with raspi-update

Sun Nov 24, 2013 9:39 am

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
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5860
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Serious problem with raspi-update

Sun Nov 24, 2013 1:23 pm

:? 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.

gordon77
Posts: 4111
Joined: Sun Aug 05, 2012 3:12 pm

Re: Serious problem with raspi-update

Sun Nov 24, 2013 8:30 pm

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 ?

pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Re: Serious problem with raspi-update

Thu Nov 28, 2013 7:20 am

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.

pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Re: Serious problem with raspi-update

Thu Nov 28, 2013 7:23 am

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.

pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Re: Serious problem with raspi-update

Thu Nov 28, 2013 7:25 am

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

pukster
Posts: 32
Joined: Sat Sep 14, 2013 7:44 am

Re: Serious problem with raspi-update

Thu Nov 28, 2013 7:28 am

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.

User avatar
pizthewiz
Posts: 1
Joined: Wed Mar 12, 2014 7:24 pm

Re: Serious problem with raspi-update

Wed Mar 12, 2014 7:34 pm

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?

coralnut
Posts: 15
Joined: Wed Dec 31, 2014 11:40 pm

Re: Serious problem with raspi-update

Thu Feb 26, 2015 2:17 pm

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.

User avatar
RaTTuS
Posts: 10409
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Serious problem with raspi-update

Thu Feb 26, 2015 2:44 pm

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
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

coralnut
Posts: 15
Joined: Wed Dec 31, 2014 11:40 pm

Re: Serious problem with raspi-update

Thu Feb 26, 2015 4:37 pm

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...

User avatar
RaTTuS
Posts: 10409
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Serious problem with raspi-update

Thu Feb 26, 2015 4:41 pm

read http://www.raspberrypi.org/forums/viewt ... 28&t=58151
then post a new thread detailing everything
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

coralnut
Posts: 15
Joined: Wed Dec 31, 2014 11:40 pm

Re: Serious problem with raspi-update

Thu Feb 26, 2015 4:51 pm

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.

User avatar
RaTTuS
Posts: 10409
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Serious problem with raspi-update

Thu Feb 26, 2015 4:58 pm

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
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

coralnut
Posts: 15
Joined: Wed Dec 31, 2014 11:40 pm

Re: Serious problem with raspi-update

Thu Feb 26, 2015 5:38 pm

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.

User avatar
DougieLawson
Posts: 35791
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Serious problem with raspi-update

Thu Feb 26, 2015 5:41 pm

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.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

coralnut
Posts: 15
Joined: Wed Dec 31, 2014 11:40 pm

Re: Serious problem with raspi-update

Thu Feb 26, 2015 5:57 pm

sorry if i gave you the wrong impression -- nobody's been removing SD cards from a powered-on system.

User avatar
RaTTuS
Posts: 10409
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: Serious problem with raspi-update

Thu Feb 26, 2015 6:06 pm

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.
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

Return to “Troubleshooting”