Page 1 of 1

rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 11:42 am
by ronan.thibaudau
I can't seem to get any of my PIs to update, i'm fairly sure this isn't a network issue on my end as this happens on raspberries both at my hope (fiber gigabit) and at our production facility many miles away. Those aren't raspberries from the same batch nor even running the same iso. All of them are raspberries 2 however and all of them have been burned from some form of raspbian downloaded from the raspberry website.

I'm getting the following output and i'm at loss about what i could do to fix it :

sudo rpi-update -y
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Downloading specific firmware revision (this will take a few minutes)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 130 0 130 0 0 279 0 --:--:-- --:--:-- --:--:-- 364
100 9 100 9 0 0 9 0 0:00:01 --:--:-- 0:00:01 27

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now

Update : note that neither fixes listed at the end of https://github.com/Hexxeh/rpi-update helped, i'm still getting the same error after syncing the time (which was already very close) as well as installing the ca package (which was already installed)

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:22 pm
by KLL
ronan.thibaudau wrote:sudo rpi-update -y
do not do that! it not works like the "apt-get install -y" command,
also "man rpi-update" or "rpi-update --help" ... will fail

pls use
sudo rpi-update
and later when the question comes answer "y" manually

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:27 pm
by kusti8
KLL wrote:
ronan.thibaudau wrote:sudo rpi-update -y
do not do that! it not works like the "apt-get install -y" command, pls use
sudo rpi-update
and later when the question comes answer "y" manually
Best yet, don't do rpi-update at all!

It gets the latest bleeding edge kernel and firmware.

For most users, the updates that you get from apt-get is perfectly fine.

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:33 pm
by KLL
@kusti8 for what you quote my answer? is it wrong?

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:39 pm
by kusti8
KLL wrote:@kusti8 for what you quote my answer? is it wrong?
No. No. AFAIK your answer was right.

Just adding onto your answer. You provided a solution, I just gave the usual rpi-update stab yourself in the foot warning.

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:40 pm
by ronan.thibaudau
KLL wrote:
ronan.thibaudau wrote:sudo rpi-update -y
do not do that! it not works like the "apt-get install -y" command,
also "man rpi-update" or "rpi-update --help" ... will fail

pls use
sudo rpi-update
and later when the question comes answer "y" manually
This has Nothing to do with my question at all, and i can't do y manually i'm scripting this for hundreds of PIs. I do know i want the update.

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:48 pm
by KLL
try:
echo 'y' | sudo rpi-update
i can not do because its up to date already, but the reaction is definitely different
from sudo rpi-update Y or -y ...

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:50 pm
by ronan.thibaudau
KLL wrote:try:
echo 'y' | sudo rpi-update
i can not do because its up to date already, but the reaction is definitely different
from sudo rpi-update Y or -y ...
Hmm actually you're right but i'm still confused about the error message, why is it trying to download Something and complaining about gzip's Stream instead of complaning about wrong syntax. Odd, in any case thanks

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:54 pm
by KLL
ronan.thibaudau wrote:is it trying to download Something and complaining about gzip's Stream
i think that too, there might be a optional zip file name as parameter,
but as -h --help and man not works? who knows
update: see here https://github.com/Hexxeh/rpi-update
and pls tell us if that pipe trick works

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 12:56 pm
by ronan.thibaudau
KLL wrote:
ronan.thibaudau wrote:is it trying to download Something and complaining about gzip's Stream
i think that too, there might be a optional zip file name as parameter,
but as -h --help and man not works? who knows
and pls tell us if that pipe trick works
aye it works thanks!

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 1:52 pm
by DougieLawson
If you have a need to run rpi-update which is very much not recommended.
SKIP_WARNING=1 rpi-update

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 1:53 pm
by ronan.thibaudau
DougieLawson wrote:If you have a need to run rpi-update which is very much not recommended.
SKIP_WARNING=1 rpi-update
What exactly does this do (will this only affect rpi-update or will it affect anything else?)

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 4:22 pm
by DougieLawson
Read the code. If you can't do that, you shouldn't ever run rpi-update.

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 4:25 pm
by ronan.thibaudau
DougieLawson wrote:Read the code. If you can't do that, you shouldn't ever run rpi-update.
I actually didn't realize this was a script and not an executable, it's funny you suggest that as i was reading up the source on github.

But my question wouldn't be answered by reading the code, my question was can this affect anything else (as in am i setting a flag that could be read by other scripts / do i run the risk anything else using that flag or is this rpi-update specific).

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 4:26 pm
by RaTTuS
you may be amazed how many commands you run are actually scripts ;-p

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 4:27 pm
by ronan.thibaudau
RaTTuS wrote:you may be amazed how many commands you run are actually scripts ;-p
Aye, i'm new to the unix world so just grasping the surface, just happy the programming is similar enough.

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 4:33 pm
by rpdom
ronan.thibaudau wrote:But my question wouldn't be answered by reading the code, my question was can this affect anything else (as in am i setting a flag that could be read by other scripts / do i run the risk anything else using that flag or is this rpi-update specific).
It doesn't matter. When you use the form

Code: Select all

VAR_NAME=VALUE COMMAND
the environment variable is only set for the duration of that command, then goes back to its previous state.
Try this example

Code: Select all

pi@raspi2 ~ $ LANGUAGE=fr_FR df -h /
Sys. de fichiers Taille Utilisé Dispo Uti% Monté sur
/dev/root          7.2G    1.4G  5.4G  21% /
pi@raspi2 ~ $ df -h /
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.2G  1.4G  5.4G  21% /
That is changing the system language for the duration of the first df command only. It has returned to the default for the next command.

Re: rpi-update fails with gzip error

Posted: Mon Aug 17, 2015 4:34 pm
by ronan.thibaudau
Thanks that clears it up!