User avatar
HermannSW
Posts: 4815
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

[SOLVED] Help: fix rainbow stuck with smartphone+micro sdcard reader possible?

Sat Jul 17, 2021 7:59 am

I am in hospital, and my 8GB Pi4B with original display an K400+ Logitech keyboard IS my laptop here:
viewtopic.php?f=108&t=296184&p=1890031#p1890031

Image


I have an USB C Card Reader with OTG Function for Micro SD:
https://www.amazon.de/gp/product/B07KW3 ... UTF8&psc=1


Yesterday I did "sudo apt update", and then "sudo apt upgrade". Unfortunately during upgrade hospital Wifi kicked out Pi4B ( once every 24 hours).


After reboot I saw rainbow screen stuck indefinitely, so something is broken with booting.

Last timestamp in overlays directory 24 Mar 19:05, timestamp of overlays directory 16 Jul 18:31.

Oldest timestamp in /boot is 27 May 2020 for issue.txt.

Which file might be corrupt/missing?
Can I install/fix it with just smartphone and micro sd card reader?
Screenshot_20210717-094733_My Files.jpg
Screenshot_20210717-094733_My Files.jpg (234.02 KiB) Viewed 393 times
Last edited by HermannSW on Sat Jul 17, 2021 8:52 pm, edited 1 time in total.
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4815
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Help: fix rainbow stuck with smartphone+micro sdcard reader possible?

Sat Jul 17, 2021 1:04 pm

Sorted /boot by name, no "kernel*" files seems to be the problem ...
Screenshot_20210717-145712_My Files.jpg
Screenshot_20210717-145712_My Files.jpg (215.33 KiB) Viewed 350 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4815
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Help: fix rainbow stuck with smartphone+micro sdcard reader possible?

Sat Jul 17, 2021 6:22 pm

A visitor brought Micro SD card from my 2GB Pi4B at home today. I used smartphone with OTG micro SD card reader to add these lines to that card's /boot/config.txt :

Code: Select all

hdmi_cvt 800 480 60 6 0 0 0
lcd_rotate=2  # official display
I had to install "OldSchool Editor: Text Editor" on smartphone to edit the file on USB mounted micro SD card, other editors were not able to access USB. The editor worked nicely, and looked really 90s DOS editor like.

Then I booted my 8GB Pi4B with that SD card.
These kernel files are missing on the other SD card:

Code: Select all

pi@raspberrypi4B2:~ $ ls -l /boot/kernel*
-rwxr-xr-x 1 root root 6320896 Jul 17 19:58 /boot/kernel7.img
-rwxr-xr-x 1 root root 6694528 Jul 17 19:58 /boot/kernel7l.img
-rwxr-xr-x 1 root root 7758279 Jul 17 19:58 /boot/kernel8.img
-rwxr-xr-x 1 root root 5981944 Jul 17 19:58 /boot/kernel.img
pi@raspberrypi4B2:~ $ 

Currently "sudo apt upgrade" is running on new card. Since that card is only 16GB card, I had to delete a lot for being able to upgrade. I hope to finally repair the other card ...
z.jpg
20210717_195536.15%.jpg
z.jpg (54.07 KiB) Viewed 327 times
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4815
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Help: fix rainbow stuck with smartphone+micro sdcard reader possible?

Sat Jul 17, 2021 6:57 pm

Upgrade completed without issues, reboot with that SD card succeeded.
Then I did place micro SD card reader with broken micro SD card and its USBA plug into Pi4B.
This was first time I had two SD cards mounted in a Pi at the same time.

I did these copy commands and will open the case after shutdown to see whether I will be able to boot the old card:

Code: Select all

pi@raspberrypi4B2:/media/pi/boot $ cp /boot/bcm27* /boot/bootcode.bin /boot/COPYING.linux /boot/fixup* /boot/issue.txt /boot/kernel* /boot/LICENCE.broadcom /boot/start* .
pi@raspberrypi4B2:/media/pi/boot $ cp /boot/overlays/* overlays/
pi@raspberrypi4B2:/media/pi/boot $

While having Pi4B running I tested HQ camera, works (view onto other side of Neckar valley):
tst.15%.jpg
tst.15%.jpg
tst.15%.jpg (30.75 KiB) Viewed 317 times

Now its time to shutdown and switch back to (hopefully repaired) SD card and try to boot ...
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

User avatar
HermannSW
Posts: 4815
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

[SOLVED] Re: Help: fix rainbow stuck with smartphone+micro sdcard reader possible?

Sat Jul 17, 2021 8:01 pm

After placing repaired SD card back into case, reboot worked.

I had to execute these commands (commands that failed/complained, did tell me what command to try next):

Code: Select all

 2019  sudo apt upgrade
 2020  sudo dpkg --configure -a
 2021  sudo apt update
 2022  sudo apt upgrade
 2023  sudo apt --fix-broken install
 2024  sudo apt upgrade

The final upgrade succeeded, now the SD card is "fully repaired".

Summary:
  • a 2nd micro SD card was needed
  • I used a working Raspberry Pi OS card, but am pretty sure that some smartphone app will allow to flash Raspberry Pi OS from install image on a 2nd SD card with smartphone and OTG micro SD card reader
  • the approach of copying all files under /boot (except config.txt and cmdline.txt) and /boot/overlays did work for me
  • after booting repaired SD card more repair steps were needed
  • all this was done with smartphone, OTG micro SD card reader and Pi4B, no other computer needed

P.S:
Not bad now having a 2nd working micro SD card here just in case, since I will stay quite some more time here in hospital.
https://github.com/Hermann-SW/memrun
https://stamm-wilbrandt.de/2wheel_balancing_robot
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/en/Raspberry_camera.html

Return to “Advanced users”