2

Last Friday (July 19th) I did sudo apt-get update and sudo apt-get upgrade, then I shut it down. Today, I tried to power it up, but nothing appears on my screen. My HDMI cable is working properly, so it's an issue with how it's booting.

Raspbian is installed on a external SSD, and has worked fine until now. The SSD seems to be ok (I can view its contents).

I would very much appreciate any solutions, or even suggestions.

Edit:

  • The red light is on, and the green light blinks intermittently. Power is being supplied to the USB SSD.

  • I believe the problem is that the Pi no longer tries (?) to boot from the SSD, is there a way to test if it does try to do so?

  • If that's not the case, then it tries to boot but something goes wrong? Why don't I see anything?

  • I haven't ran sudo apt-get update and sudo apt-get upgrade in a while, before running it on Friday. Perhaps this had something to do with it?

Edit 2: The contents of /boot are corrupt. I tried booting with the /boot of a backup, and it works -- with tremendous errors as the Kernel used is out-of-date and it says "Failed to start Load Kernel Modules" before checking my SSD ("0-100% Complete..." -- for what, I don't know.) Once it loads (with the old /boot), the keyboard is unoperational (though it looks fine).

Clearly using the old /boot is not the solution, but at least I now know that my problem is in /boot.

Edit 3:

Perhaps using the old /boot is the solution, if nothing else can work. However, when I use the old /boot, my keyboard doesn't work and I get [FAILED] Failed to start Load Kernel Modules. I believe the cause of this is different kernels. How do I fix this, or, is there a fix without using the old /boot?

Edit 4:

Would people please give me a zip or a tarball of a recent /boot? To do this, you could cd /boot then tar -cvzf boot.tar.gz *.*; upload boot.tar.gz online (for example, use Dropbox or Google Drive). I would like a couple, so that at least one should work.

user96931
  • 739
  • 1
  • 9
  • 22
  • enable ssh, ssh into it, and see what's happening (logs) – Jaromanda X Jul 23 '19 at 08:39
  • So if I did this (https://www.raspberrypi.org/documentation/linux/kernel/building.md), would that fix the problem? I wouldn't recompile the kernel, but merely try to copy the working kernel to the problematic one. – user96931 Jul 23 '19 at 13:39
  • "0-100% Complete..." -- for what, I don't know" -> Most likely it is scanning the root fs for errors, which should happen if it was mounted uncleanly (the check, not the errors). If this takes a long time, or repeats every boot even after you are sure there was a clean shutdown, you might want to check it yourself w/ fsck on another box. – goldilocks Jul 23 '19 at 13:43
  • So it appears using the old /boot is the only way to fix this, but when I use it, the keyboard doesn't work and I get "Failed to start Load Kernel Modules" -- I believe there is a difference between the two kernels that causes this? – user96931 Jul 23 '19 at 13:55
  • I'd try to use the boot partition of the recent raspbian image with the needed modifications in cmdline.txt.. – jake Jul 23 '19 at 14:43
  • Yep @jake, but where would I find one? – user96931 Jul 23 '19 at 17:25
  • https://github.com/raspberrypi/firmware/tree/stable/boot Check and see that 'firmware/modules' one level up contains a directory that you already have (4.19.58-v7), otherwise you will have to install that. The Pi kernel should boot without any modules available anyway, but some peripherals may not work (a standard keyboard should be okay, dunno what's up with that). – goldilocks Jul 23 '19 at 18:55
  • Thanks. I used those files for my /boot, but it gives me a black screen. A couple questions: how come there's no cmdline.txt and config.txt? And how would I check to see if I have that 4.19.58-v7? – user96931 Jul 23 '19 at 19:25
  • I'm just not completely understand your setup. Do you have a SD Card inserted or do you completely boot from the USB SSD drive without SD Card? B.t.w. I would take a complete backup of the SSD drive before going on to recover boot up. Please address me with @Ingo, otherwise I won't see your reply. – Ingo Jul 23 '19 at 21:13
  • Rather than collecting random /boot directories form random SE users why no just extract the canonical one from a fresh Raspbian image? For example: https://raspberrypi.stackexchange.com/questions/1043/how-do-i-mount-the-img-files-under-ubuntu/37337#37337 – Roger Jones Jul 24 '19 at 08:13

1 Answers1

2

Ok, so I finally fixed it (thanks to everyone) :)

I deleted everything in /boot, replaced it with the contents of my backup, and added the kernel modules from my backup to /lib/modules.

It entered me into emergency mode, then I did the sequence:

apt-get update
apt-get remove raspberrypi-kernel
apt-get install raspberrypi-kernel
reboot

Now, I have the most up-to-date kernel (4.19.57-v7+) and it's all working properly. In the future, I'll take care to avoid updating the kernel without backing everything up (I'm glad I did) :)

majki
  • 3
  • 2
user96931
  • 739
  • 1
  • 9
  • 22
  • 1
    I am not sure this would work in general sudo apt-get update; sudo apt-get install --reinstall raspberrypi-bootloader raspberrypi-kernel will put it back to the latest supported kernel/bootcode. (sudo not needed if logged in as root) – Milliways Jul 26 '19 at 06:43