Hexxeh / rpi-update

An easier way to update the firmware of your Raspberry Pi
MIT License
1.94k stars 232 forks source link

Invalid hash given #277

Closed GabrielKn8 closed 4 years ago

GabrielKn8 commented 5 years ago

"Would you like to proceed?" does not accept "y".

mbaccia514 commented 5 years ago

Also had this issue on a (relatively) fresh install. After performing apt updates the rpi-update command aborts with "Invalid git hash specified". Gives the same error when specifying different hashes as well.

See also: https://github.com/Hexxeh/rpi-update/issues/261

popcornmix commented 5 years ago

Seems to be a temporary github issue. It's working for me currently. Is this still an issue?

ricktendo commented 5 years ago

Yes, this error still happening to me since yesterday.

pucelev commented 5 years ago

I tried this morning and I'm also getting this error

Shadesh commented 5 years ago

Please make sure you don't (DNS or whatever) block GitHub Domains. For me it was "codeload.github.com" which was blocked by PIHole.

That prevented a successful download of fresh firmware with rpi-update.

pucelev commented 5 years ago

Thanks Shadesh! I disabled Pihole and was able to do the rpi-update.

ricktendo commented 5 years ago

Yes, it was Pi-Hole

popcornmix commented 5 years ago

I've added a warning in troubleshooting section of readme about pi-hole blocking.

A further todo would be to detect the dns block directly by the tool.

Can someone with pi-hole set up to block report the output of: curl https://api.github.com/repos/Hexxeh/rpi-firmware/commits/master

ricktendo commented 5 years ago

Yes Pi-Hole did allow api.github.com, so nothing out of the ordinary

https://paste.ofcode.org/89pxL9kF9W8g8wmqYy92si

For me only codeload.github.com was blocked as malicious by the following two block lists:

1) https://www.squidblacklist.org/downloads/dg-malicious.acl 2) https://hosts-file.net/emd.txt

FYI I get my Pi-Hole blocklists from the following site: https://firebog.net/

I use the ticked lists: https://v.firebog.net/hosts/lists.php?type=tick

peatrick commented 5 years ago

I guess I'll also chalk this one up to Pi-hole related issues. Disabled (both) Pi-hole(s) and adjusted /etc/resolv.conf to use nameserver 1.1.1.1 instead of my Unbound server(s) at 127.0.0.1 / localhost and am now happily using:

Linux pihole2 4.19.40-v7+ #1217 SMP Tue May 7 17:22:08 BST 2019 armv7l GNU/Linux

qyqsoft commented 5 years ago

You have to whitelist codeload.github.com in your pi-hole. That solved the issue for me.

OliverGruenberg commented 5 years ago

just wanted to update kernel to v4.19.57-v7+ via sudo rpi-update 6e787b87ace9f945f17a9022288e2758ed281cf7

results in *** Invalid hash given

no pi-hole running btw

OliverGruenberg commented 5 years ago

got it: the provided git hash in https://github.com/Hexxeh/rpi-firmware/blob/master/git_hash was incorrect. The correct one for kernel v4.19.57 is: f8060224e53e26cdaea5b9f6f010ac8c3692e2ea

popcornmix commented 5 years ago

https://github.com/Hexxeh/rpi-firmware/blob/master/git_hash

is the git hash of the kernel used to build the image. e.g. https://github.com/raspberrypi/linux/commit/6e787b87ace9f945f17a9022288e2758ed281cf7

It is correct.

Ruffio commented 4 years ago

@GabrielKn8 has this issue been resolved?

GabrielKn8 commented 4 years ago

@Ruffio l gave up on this. So, no update on my end.

pelwell commented 4 years ago

These aren't problems that rpi-update can solve.

Zeguym commented 3 years ago

Also had this issue on a (relatively) fresh install. After performing apt updates the rpi-update command aborts with "Invalid git hash specified". Gives the same error when specifying different hashes as well.

See also:

261

I had the same problem and it was missing public_repo right in the github access token

maguilara commented 3 years ago

My "apt update && upgrade" failed for some reason and kernel modules didn't match the one that I had currently installed, and rpi-update-ing to the corresponding commit with the matching kernel version didn't work with this exact error. I had not DNS issues, my pihole went down with my docker (which is why I realized something was wrong with the upgrade) and I didn't use the pihole dns on my raspberry pi anyway. I managed to solve it by downloading the whole firmware repo to that exact commit, and replaced /boot/ directory with the /boot/ directory from the branch downloaded Rebooted and it took minute to load correctly, but it went fine. Hopefully this helps someone. I recommend taking a backup of your SD before doing this! I didn't do it, but it was a risk I took, doesn't need to be your case!

gatedfuzz commented 3 years ago

My "apt update && upgrade" failed for some reason and kernel modules didn't match the one that I had currently installed, and rpi-update-ing to the corresponding commit with the matching kernel version didn't work with this exact error.

I had not DNS issues, my pihole went down with my docker (which is why I realized something was wrong with the upgrade) and I didn't use the pihole dns on my raspberry pi anyway.

I managed to solve it by downloading the whole firmware repo to that exact commit, and replaced /boot/ directory with the /boot/ directory from the branch downloaded Rebooted and it took minute to load correctly, but it went fine. Hopefully this helps someone.

I recommend taking a backup of your SD before doing this! I didn't do it, but it was a risk I took, doesn't need to be your case!

Same thing just happened to me because my time was exactly 5 hours out of sync. Strange.

maguilara commented 3 years ago

Same thing just happened to me because my time was exactly 5 hours out of sync. Strange.

Well, mine wasn't out of sync AFAIK, last reboot was less than 2 days ago, not enough time for me to detect that it was out of sync. And I believe the system asks for new time periodically either way. But my timezone is UTC-5, not sure if that is related or not.

gatedfuzz commented 3 years ago

Same thing just happened to me because my time was exactly 5 hours out of sync. Strange.

Well, mine wasn't out of sync AFAIK, last reboot was less than 2 days ago, not enough time for me to detect that it was out of sync. And I believe the system asks for new time periodically either way. But my timezone is UTC-5, not sure if that is related or not.

its funny because i cant get mine to sync back now. i was about to reflash anyway after i spent the evening seeing how quickly i could break it, guess i didnt have to try that hard.