Broken linux headers on update

I upgraded my system (RBPi 4 4GB) from 6.32.1 to v6.32.2 with “dietpi-update” tool. Everything appeared to be fine, I saw that it was installing 5.6 kernel stuff, so I though that it was a good idea to reboot. RBPi was restarted, but wireguard PtP VPN interface was broken and unable to bring up manually, this is a remote box not installed at home (nice that I had an autossh tunnel as backup a connection to SSH the device).

After this 1st restart, kernel 5.4.51-v7l+ is loaded (I thought 5.6 would be loaded, but ok). Wireguard was not able to bring up the previous wg0 interface, as I mentioned, the issue was clearly as this one: https://raspberrypi.stackexchange.com/questions/114598/wireguard-unknown-device-type-protocol-not-supported BUT I already had my Linux headers installed previously. Firstly, I tried to reconfigure dkms wireguard module, with no luck, told me that kernel headers were not available. The final solution was to launch the following command: “sudo dpkg-reconfigure raspberrypi-kernel-headers”. Then rebooted my RBPi.

Is this an expected behavior?
Why the update process does not reconfigure linux-headers package?
I am sorry but I do not have dietpi-update output available…

After this 2nd reboot, you can see loaded and available kernels here.





Extra question (sorry for being a newbie on kernel stuff): why 5.6 kernel is not being loaded? its img is installed in /boot at least?

Hi,

many thanks for your message. Let me answer as first your last question. There is no kernel 5.6 released for your board. As you are using RPi4, the base image used is a Raspberry OS. And there, latest kernel available is 5.4.51 https://en.wikipedia.org/wiki/Raspberry_Pi_OS

Not sure how it could happen but on my RPi4, I don’t have any 5.6 packages installed. And yes, my system is up-to-date and I’m using Wireguard as well. Did you used rpi-update to load some pre-release version?

root@DietPi4:~# ls -la /lib/modules/
total 24
drwxr-xr-x  6 root root 4096 Aug 10 01:08 .
drwxr-xr-x 16 root root 4096 Jul 29 17:30 ..
drwxr-xr-x  3 root root 4096 Sep 27 00:32 5.4.51+
drwxr-xr-x  3 root root 4096 Sep 27 00:33 5.4.51-v7+
drwxr-xr-x  3 root root 4096 Sep 27 00:33 5.4.51-v7l+
drwxr-xr-x  3 root root 4096 Sep 27 00:33 5.4.51-v8+
root@DietPi4:~#

As far as I can see, the 5.6 package was installed on 3rd of August while the 5.4 kernel modules are from 14th of October. Probably you installed something at that time ??

These are the Raspberry OS kernel moduls

root@DietPi4:~# dpkg -l|grep raspberry
ii  libraspberrypi-bin            1.20200902-1                 armhf        Miscellaneous Raspberry Pi utilities
ii  libraspberrypi0               1.20200902-1                 armhf        EGL/GLES/OpenVG/etc. libraries for the Raspberry Pi's VideoCore IV
ii  raspberrypi-bootloader        1.20200902-1                 armhf        Raspberry Pi bootloader
ii  raspberrypi-kernel            1.20200902-1                 armhf        Raspberry Pi bootloader
ii  raspberrypi-kernel-headers    1.20200902-1                 armhf        Header files for the Raspberry Pi Linux kernel
ii  raspberrypi-sys-mods          20200812                     armhf        System tweaks for the Raspberry Pi
root@DietPi4:~#

As you can see, they are from 2nd of September 2020, which fits the latest release of Raspbian OS Kernel 5.4 https://github.com/raspberrypi/linux/releases

So question is where did you get the 5.6 package from? You could use apt show to get further information on this packge. Did you add any additional Debian package source list’s?

However this all has nothing to do with dietpi-update because Kernel as well as Debian packages are installed from original source and manages via Debian APT package manager. The only thing dietpi-update is doing, is to call apt update && apt upgrade before executing update of DietPi scripts.

Hint 1: I highly recommend to perform a dietpi-backup before updating your system. This way, you are able to revert changes if things goes wrong (like your case).

Hint 2: There is no need to perform screen shots. As you are using an SSH terminal program, you should be able to mark the lines needed and copy them into the forum board as code snippet.

Thank you for your quick response. Mmmm… about this misterious 5.6 kernel your comment reminds me about the fact that I tried to upgrade to 5.6 kernel branch. I think that this was because I wanted the wireguard stuff that came with (kernel level dynamic debugging wireguard, etc). Of course, I it never worked, as I discovered that it does not fit my platform (I thought it was as easy to have previous .dtb from RBPi and then a Linux kernel that I can install through apt… :rofl:).

Here you are the package info:

dietpi@DietPi:~ $ dpkg --list | grep linux-image
ii  linux-image-5.6.0-0.bpo.2-rt-armmp 5.6.14-2~bpo10+1                    armhf        Linux 5.6 for ARMv7 multiplatform compatible SoCs, PREEMPT_RT
ii  linux-image-rt-armmp               5.6.14-2~bpo10+1                    armhf        Linux for ARMv7 multiplatform compatible SoCs (meta-package)
dietpi@DietPi:~ $ apt show linux-image-rt-armmp
Package: linux-image-rt-armmp
Version: 5.6.14-2~bpo10+1
Priority: optional
Section: kernel
Source: linux
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Installed-Size: 13,3 kB
Provides: linux-latest-modules-5.6.0-0.bpo.2-rt-armmp, wireguard-modules (= 1.0.0)
Depends: linux-image-5.6.0-0.bpo.2-rt-armmp (= 5.6.14-2~bpo10+1)
Homepage: https://www.kernel.org/
Download-Size: 1.484 B
APT-Manual-Installed: no
APT-Sources: http://deb.debian.org/debian buster-backports/main armhf Packages
Description: Linux for ARMv7 multiplatform compatible SoCs (meta-package)

dietpi@DietPi:~ $ apt show linux-image-5.6.0-0.bpo.2-rt-armmp
Package: linux-image-5.6.0-0.bpo.2-rt-armmp
Version: 5.6.14-2~bpo10+1
Priority: optional
Section: kernel
Source: linux
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Installed-Size: 164 MB
Depends: kmod, linux-base (>= 4.3~), initramfs-tools (>= 0.120+deb8u2) | linux-initramfs-tool
Recommends: firmware-linux-free, apparmor
Suggests: linux-doc-5.6, debian-kernel-handbook
Breaks: initramfs-tools (<< 0.120+deb8u2), wireless-regdb (<< 2019.06.03-1~)
Homepage: https://www.kernel.org/
Download-Size: 35,4 MB
APT-Manual-Installed: no
APT-Sources: http://deb.debian.org/debian buster-backports/main armhf Packages
Description: Linux 5.6 for ARMv7 multiplatform compatible SoCs, PREEMPT_RT

I will uninstall this 5.6 kernel. I may be getting rid of problems with headers in the future.

Finally, I will follow your advice and use dietpi-backup solution or my a custom rsync, will see how it works.

Yeah that’s not working, you can’t install kernel from pure Debian repository for RPi device

Btw, next Raspberry OS Kernel will be 5.9 https://forums.raspberrypi.com/viewtopic.php?t=28823

It can be easily installed using sudo BRANCH=next rpi-update. But yeah early alpha. So nothing for production use. :wink:

 ─────────────────────────────────────────────────────
 DietPi v6.32.2 : 00:15 - Thu 10/15/20
 ─────────────────────────────────────────────────────
 - Device model : RPi 3 Model B+ (armv7l)
 - Uptime : up 1 minute
 - CPU temp : 37'C : 98'F (Cool runnings)
 - LAN IP : 192.168.0.12 (eth0)
 - Info Test : !!! DEMO 32bit Image !!!
  ─────────────────────────────────────────────────────

root@DietPi3:~# uname -a
Linux DietPi3 5.9.0-v7+ #1351 SMP Wed Oct 14 12:46:10 BST 2020 armv7l GNU/Linux
root@DietPi3:~#

It’s brand new kernel for testing, created on14th of October