First off, I have seen a lot of questions/answers talking about the rainbow screen. However everywhere I looked the issue only seems to occur on the first time the system is booted.
In my case it's different. I have a pi-hole setup on my raspberry pi 3 b+. OS is Raspbian Stretch Lite.
I have used it for months without any issues and during this time updated the pi-hole (pihole -up) and the system (sudo apt-get update and upgrade) multiple times.
Today I saw that there was a new update (v4.2.2) for the pi-hole in the webinterface. I logged into an ssh session with the pi and executed the update command for pihole. Weirdly it got stuck and wouldn't update while fetching some data from the internet.
I then though okay I'll just update the other stuff first. Executed sudo apt-get update and there was the following error "failed to exec method /usr/lib/apt/methods/http". Searching for that lead me here where there is a first mention to repairing the filesystem.
Since I didn't want to do execute commands I know nothing about right away, I simply restarted the pi.

After rebooting I got the rainbow screen.
Most of the answers I found about that were "you installed an old image, you'll need to flash a newer one" and there often is a link on how to flash your sd-card. But I already did all of that months ago and had no issues until now.

Another idea I often saw was "you're not using the right power supply" but I'm using the official one which, once again, has worked for months.

There (here in fact) was also a suggestion to add boot_delay=1 to the config-file. I did this and it didn't help.

Now what I need is a way to fix this without loosing the data I currently have on the pi.
In the same question as mentionend before there's also this:

..However if the coloured screen remains, it suggests the kernel.img file is failing to boot. Try replacing it with a known good one.

Since I'm not very experienced with Raspis and linux itself, I don't know what this would do.
I know I can get the kernel.img if I open the current raspian img with 7zip and inside that open 0.fat. This seems to be the fat partition which gets mountet if you plug the sd-card into windows. In there you could extract kernel.img but I don't know if that's the right way and I also don't know if there are any consequences of simply deleting the old one and replacing it with the new one.

Does anyone have an idea on how to fix this without loosing the data on the pi?

Edit (some additional information):
There is are two status-leds and one is ACT-led (read from here).
The ACT-led signals if there is SD-card activity. In the first ~7 seconds this led is lit up green. After that the led shuts off entirely. I don't what this means and if it's supposed to happen but maybe it helps answering the question.

Edit 2:
I've read some more about the act-led (mostly here) and it seems like the led is supposed to blink for a while. In my case it blinks once right at the start before just being lit. I assume this means the raspberry pi isn't able to read from the card.
What could be the cause of this and how do I fix it (other than reinstalling)?

  • Updates (even if done correctly) sometimes fail but rebooting during an update often causes problems. Restore from your backup and try again.
    – Milliways
    Jun 4 '19 at 12:07
  • Heh my backup.. It's only a pi-hole and I don't really need the data I have on it. Still I thought maybe I was able to save it. Is replacing the kernel.img an idea? Or what does this even do?
    – Joelius
    Jun 4 '19 at 12:17
  • The most relevant piece of information in your post is "Weirdly it got stuck and wouldn't update while fetching some data from the internet". Could you expand that part a bit? Any error messages? Jun 4 '19 at 13:06
  • Sadly I of course can't reconstruct it since my pi is now dead. If I remember correctly it had done a few lines and the pi-hole logo showed up, the checkmarks started etc. After a while it got to a part where it said something like "fetching from .." where, I assume, it downloaded the new packages. However it stayed at 0% for a while and usually when I updated the pi-hole it get though that point in no time. After a while I aborted it (maybe that killed it) and thought since it was only downloading something it shouldn't be an issue. After that also apt-get update broke that's when I rebooted.
    – Joelius
    Jun 4 '19 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.