maxnet / berryboot

Berryboot -- Boot menu / OS installer
http://www.berryboot.com/
Other
805 stars 133 forks source link

Can't update kernel from 4.19 to 5.4 / Ubuntu 20.04LTS RPi4B #631

Open pseudofunizer opened 4 years ago

pseudofunizer commented 4 years ago

Hi there!

I'm having troubles updating the kernel or the kernel headers in a Ubuntu 20.04 LTS 64-bit edition that's installed on a Raspberry Pi 4B using BerryBoot and the Ubuntu 20.04 LTS 64-bit package that was associated with it.

I'm using BerryBoot to jump-boot to an external SSD drive. I'm a bit unsure if this is a Ubuntu issue, a Raspberry Pi issue, a BerryBoot issue or all of the combined. I've tried searching for different solutions in failed kernel updates in Ubuntu and it seems that it's something that has been plaguing especially Raspberry Pi users for quite a while now.

For instance, when I try to install linux-headers-generic:

ubuntu@ubuntu:~$ sudo apt install linux-headers-generic
Reading package lists... Done
Building dependency tree       
Reading state information... Done
linux-headers-generic is already the newest version (5.4.0.31.36).
linux-headers-generic set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-firmware-raspi2 (1.20200212-0ubuntu1) ...
Error: missing /boot/firmware, did you forget to mount it?
dpkg: error processing package linux-firmware-raspi2 (--configure):
 installed linux-firmware-raspi2 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-firmware-raspi2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now, I've tried mounting the boot to different places as workaround attempts, such as mounted the /boot/ partition separately, but at least /dev/mmcblk0p1 is out of the question for that purpose as it's a FAT32 filesystem to begin with, and low on space to end with. Also, Ubuntu devs have stated that a FAT32-based /boot or symlinking to one isn't supported and have marked the issue as "wontfix" a long time ago; see: [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864525] . Temporarily mounting /boot on another type of fs with enough space in it doesn't do much good either. :(

Been also going through /etc/fstab , &cetera. I have the same problems in kernel/kernel header updates when running the sudo apt flash-kernel as well.

The kernel and kernel header update process has gone perfectly well multiple times on another 20.04 LTS install I recently made using the official Raspberry Pi imager as I couldn't solve this one. Being an official image and all, it "somehow" seems to have the kernel/kernel header update snag fixed altogether. Any ideas for a [f/w]orkaround? Thanks so much in advance and keep on geekin'! Cheers!

velainur commented 4 years ago

I also had some troubles while upgrading kernel.

I have tested Elementary, RaspbianX, Raspbian Buster... and i got different errors, all related to kernel.

In elementary, i got 2, one with missing /boot/firmware from u-boot-rpi:arm64. I still didnt find a workarround. And the second one with flash-kernel, i solved just copying the dtd file where he asked for. In Raspbian Buster, i got a problema with the "dphys-swapfile", i just uninstalled since seems its something recomended while you use SD Card.

Anyway, seems any OS you install and get kernel updated get damaged (since upgrade wont be finnished anymore, and you cannot install something else while this issue is up).

Any solution to solve it definetively?

HinTak commented 3 years ago

Berryboot uses a custom kernel to boot the rest of another OS, so you cannot update the kernel / kernel headers / kernel modules from "another OS". If you need extra our-of-tree kernel modules, you need to rebuild berryboot itself.

Here's my custom build to add extra out-of-tree kernel modules - https://github.com/HinTak/berryboot/releases

FWIW, see my notes https://github.com/HinTak/RaspberryPi-Dev/blob/master/LibreELEC-and-Volumio.md