Just ran into what I think is called the “rainbow screen of death” where a fully functioning RaspberryPi running Raspbian stopped working on me after a reboot.
I know my MicroSD card is good quality and I wasn’t mucking with the boot file system before the reboot so it baffled me why things would just stop working.
I ran then MicroSD card through SpinRite and that didn’t solve the problem. If I connected the microSD card to another PC all the files were there.
Based on my research I found this happens from time to time where something goes wrong with the /boot volume. I could have just re-loaded and re-setup my RPi (it would have taken less time at this point) but I decided I wanted to try and fix it with out losing all of my data.
This is what worked for me:
- Image a fresh spare microSD card with the same distro of Raspbian you’re using on the non-functional microSD
- Connect the non-functional microSD to the same PC you have your freshly imaged microSD connected
- In Windows there is going to be one partition (disk) under My Computer you can actually view, that’s the boot partition
- On the non-functioning microSD copy ‘cmdline.txt’ and ‘config.txt’ to some place safe on your computer
- Copy the entire contents of the boot partition from the new microSD to the bad one overwriting all files when prompted
- Copy the backups of ‘cmdline.txt’ and ‘config.txt’ on to the bad microSD
If you’ve never run ‘rpi-update’ then you’re done. You should be able to put the microSD into your RPi and it will boot again.
If you have run ‘rpi-update’ you have a bit more work to do.
- Go to https://github.com/raspberrypi/firmware/releases and download the release that matches the date of the last time you ran rpi-update
Note: If you don’t know when this is you might be able to boot the RPi now, login locally and dig through your ‘history’ or look at the date/time stamps on the files in /boot - Extract the downloaded file
- Copy the contents of firmware-#.#######\boot into \boot on your bad microSD overwriting all files when prompted
Now you’re done. You should be able to put that bad microSD back into a RPi and have it boot
Once your RPi is backup and running I highly recommend manually running a ‘rpi-update’
References
- https://www.element14.com/community/message/81875/l/re-updating-raspberry-pi-without-connecting-to-the-internet#81875
- https://raspberrypi.stackexchange.com/questions/24159/recovering-a-borked-boot-partition?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
- https://www.raspberrypi.org/forums/viewtopic.php?t=7893
THANK YOU!
You saved my stupid butt.