Kernel header for Volumio 3

Hello,
Maybe this question has been answered or is in duplicate but I can’t find an answer.
I’m using my RPI 4 for :

  • music : volumio
  • DNS filtering : pihole
  • networking : wireguard

I’m running volumio and pihole just fine but I can’t install wireguard. I’m not that much linux literate and I’ve tried to install/build wireguard on both the stable officail volumio distro as well as the latest buster beta .
I gave up the installation on the stable release and so far no issue on the volumio side on buster, including pihole. However I’m stuck on installing Wireguard.
My issue is as follows :
uname -r answers 5.4.83-v7l+
and I get install the corresponding kernel headers to build wireguard.

Any help in installing the relevant kernel headers would be appreciated

Thanks

Georges

Well here’s the answer to your question:

sudo apt install linux-headers-$(uname -r)

BUT no idea what problems that might make for your Volumio installation.

(Blythly following internet guides without understanding what you are doing often ‘ends in tears’. :wink: )

Thanks Chris for the answer, but I can’t get the correct version of the headers.

E: Unable to locate package linux-headers-5.4.83-v7l
E: Couldn’t find any package by glob ‘linux-headers-5.4.83-v7l’
E: Couldn’t find any package by regex ‘linux-headers-5.4.83-v7l’

If I omit a specific version of the headers (ie sudo apt install linux-headers), it installs the rasperry-pi headers

(Note, selecting 'raspberrypi-kernel-headers' instead of 'linux-headers'
raspberrypi-kernel-headers is already the newest version (1:1.20210430-2).)

And in /usr/src I know have the following folders (that do not correspond to 5.4.83-v7l+)

linux-headers-5.10.17+ linux-headers-5.10.17-v7l+ linux-headers-5.10.17-v7+

However, in /lib/modules/ I do have the following folders (including 5.4.83-v7l+)

5.10.17+ 5.10.17-v7+ 5.10.17-v7l+ 5.4.83+ 5.4.83-v7+ 5.4.83-v7l+

But the 5.4.83-v7l+ does not contain a required build directory

As you have seen I’m quite out of my depth here (and I’m tryng to understand what I’m doing), however no teards will be shed ; but thanks for caring !

Sorry, had my Debian head on. It will of course be RPi kernel headers.

Is it (wireguard) not available as a package?

Thanks again Chris !
Yes there is a wireguard package.
From a freshly flashed Volumiobuster-3.074-2021-05-17-pi.img.
I did the following commands :

sudo apt update
sudo apt install wireguard

The apt install wireguard yielded :

The following additional packages will be installed:
build-essential bzip2 dkms dpkg-dev fakeroot g++ g+±8 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libfakeroot libstdc+±8-dev make patch raspberrypi-kernel-headers wireguard-dkms
wireguard-tools
Suggested packages:
bzip2-doc python3-apport menu debian-keyring gcc-8-doc libstdc++6-8-dbg libstdc+±8-doc make-doc ed diffutils-doc
openresolv | resolvconf
The following NEW packages will be installed:
build-essential bzip2 dkms dpkg-dev fakeroot g++ g+±8 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libfakeroot libstdc+±8-dev make patch raspberrypi-kernel-headers wireguard wireguard-dkms wireguard-tools

The install goes nicely until :

Setting up dkms (2.6.1-4) …
Setting up wireguard-dkms (1.0.20210124-1~bpo10+1) …
Loading new wireguard-1.0.20210124 DKMS files…
> It is likely that 5.4.83-v7l+ belongs to a chroot’s host
> Building for 5.10.17+, 5.10.17-v7+, 5.10.17-v7l+, 5.4.83+, 5.4.83-v7+ and 5.4.83-v7l+
> Building initial module for 5.10.17+
> Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
> does not match this kernel/arch. This indicates that it should not be built.
> Skipped.
> Building initial module for 5.10.17-v7+
> Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
> does not match this kernel/arch. This indicates that it should not be built.
> Skipped.
> Building initial module for 5.10.17-v7l+
> Error! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive which
> does not match this kernel/arch. This indicates that it should not be built.
> Skipped.
Module build for kernel 5.4.83+ was skipped since the
> kernel headers for this kernel does not seem to be installed.
> Module build for kernel 5.4.83-v7+ was skipped since the
> kernel headers for this kernel does not seem to be installed.
> Module build for kernel 5.4.83-v7l+ was skipped since the
> kernel headers for this kernel does not seem to be installed.
Setting up g+±8 (8.3.0-6+rpi1) …

I suspect you’re not going to make any progress here. Volumio is not intended to a be a general purpose OS, and you are limited in what you can change without running into problems. Why do you need VPN on a Volumio device anyway?

I was just hoping to install several services on one box. But a use case could be to access to media file on another location, hence the VPN

1 Like

it was possible to download the kernel source and locally build modules with the following command, but apparently it doesn’t work properly in Volumio Buster:

volumio kernelsource

@volumio @ashthespy any clue why?

please forget my question, I know why… I tried to run on CM4 and the processor is not recognized during the initial check

it should work on your RPi4

1 Like

Thank you Darmur.
Had to comment out the check at the end of the script.

if (cat /proc/cpuinfo | grep ‘^Hardware.BCM2[78][013][05-9].’ > /dev/null); then

The script is still running and I will update this thread with the outcome when it’s done

Well I got further.
Will keep working and posting my results when I’m done.
Thank you both

Georges, please stick to the Volumio Beta Rules and do not install additional software and ask support for it.
Ofc you can install anything you want, but you’re on your own with it.