Jump to content
Pirate

No wireguard headers

Recommended Posts

Hi all,

Unable to install WireGuard on TinkerBoard 2 running 2.0.0

I've installed `linux-headers-arm64` but, wireguard doesn't seem to have the required headers in the kernel

 

root@Harbormaster:~# modprobe wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.4.194

 

 

root@Harbormaster:~# sudo wg-quick up wg0
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0"
root@Harbormaster:~# sudo wg show wg0
Unable to access interface: Protocol not supported

 

 

According to https://github.com/adrianmihalko/raspberrypiwireguard/issues/11 Wireguard not starting because of wrong kernel-headers

Edited by Pirate

Share this post


Link to post
Share on other sites

Can't install openvpn either. Looks like more missing modules.

root@Harbormaster:~# modprobe tun
modprobe: FATAL: Module tun not found in directory /lib/modules/4.4.194
May  6 22:27:00 Harbormaster systemd[1]: Couldn't stat device /dev/net/tun: No such file or directory
May  6 22:27:00 Harbormaster systemd[1]: openvpn@server.service: Failed with result 'exit-code'.

 

Edited by Pirate

Share this post


Link to post
Share on other sites

@Frank3_Wu thanks, I was able to install the kernel header successfully

wget https://github.com/TinkerBoard2/kernel/releases/download/tinker_board_2-debian_10-2.0.0/linux-headers-4.4.194_4.4.194-1_arm64.deb
dpkg -i linux-headers-4.4.194_4.4.194-1_arm64.deb

However, it seems /boot/ doesnt have enough disk space

root@Harbormaster:~# apt-get install wireguard
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  linux-image-5.10.0-6-cloud-arm64 linux-image-cloud-arm64
Suggested packages:
  linux-doc-5.10 debian-kernel-handbook
Recommended packages:
  firmware-linux-free apparmor
The following NEW packages will be installed:
  linux-image-5.10.0-6-cloud-arm64 linux-image-cloud-arm64 wireguard
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/16.3 MB of archives.
After this operation, 81.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 100742 files and directories currently installed.)
Preparing to unpack .../linux-image-5.10.0-6-cloud-arm64_5.10.28-1_arm64.deb ...
Unpacking linux-image-5.10.0-6-cloud-arm64 (5.10.28-1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-5.10.0-6-cloud-arm64_5.10.28-1_arm64.deb (--unpack):
 cannot copy extracted data for './boot/vmlinuz-5.10.0-6-cloud-arm64' to '/boot/vmlinuz-5.10.0-6-cloud-arm64.dpkg-new': failed to write (No space left on device)
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
W: Last kernel image has been removed, so removing the default symlinks
Selecting previously unselected package linux-image-cloud-arm64.
Preparing to unpack .../linux-image-cloud-arm64_5.10.28-1_arm64.deb ...
Unpacking linux-image-cloud-arm64 (5.10.28-1) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../wireguard_1.0.20210223-1_all.deb ...
Unpacking wireguard (1.0.20210223-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/linux-image-5.10.0-6-cloud-arm64_5.10.28-1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

 

I checked how much space I have left and its enough

Quote

root@Harbormaster:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        15G  8.1G  5.5G  60% /
devtmpfs        972M  8.0K  972M   1% /dev
tmpfs           980M   13M  968M   2% /dev/shm
tmpfs           980M   25M  956M   3% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           980M     0  980M   0% /sys/fs/cgroup
log2ram         250M   21M  230M   9% /var/log
/dev/mmcblk1p7  4.9M  192K  4.5M   5% /boot
tmpfs           196M     0  196M   0% /run/user/998
tmpfs           196M     0  196M   0% /run/user/0
tmpfs           196M  8.0K  196M   1% /run/user/1000

 

 

Share this post


Link to post
Share on other sites

@Frank3_Wu please consider making /boot/ partition bigger in future releases

Now I am playing with GParted, trying to resize /boot/ partition so I can install wireguard

Share this post


Link to post
Share on other sites

tinker2_kernel_1-wire.tgz
https://asus-my.sharepoint.com/:u:/p/joe_sun/ESh3OzqpXi1GsPqlQqd2roYBY3UI6DoTd2wizrWQS6IwXw?e=7HpAnU

Hi  @Shadway:

Can you try the attachment 1-wire driver
1)  copy boot.img to tinker2
2)  sudo dd if=boot.img of=/dev/mmcblk1p4
3)  sudo vi /boot/config.txt
    add overlay=w1-gpio
4)  Reboot tinkerboard and the /sys/bus/w1/devices/w1_bus_master1 is generated.
5) GPIO0B0 (The 7th leg of 40Pin) is 1-wire Pin
Hope helps you

Joe

Share this post


Link to post
Share on other sites

Hello.

Are there any news regarding this?

I'm trying to setup a Tinker 2S board and install OpenVPN, but the TUN/TAP module is not installed.

Share this post


Link to post
Share on other sites
On 11/1/2021 at 9:56 AM, Joe said:

tinker2_kernel_1-wire.tgzUnavailable
https://asus-my.sharepoint.com/:u:/p/joe_sun/ESh3OzqpXi1GsPqlQqd2roYBY3UI6DoTd2wizrWQS6IwXw?e=7HpAnU

Hi  @Shadway:

Can you try the attachment 1-wire driver
1)  copy boot.img to tinker2
2)  sudo dd if=boot.img of=/dev/mmcblk1p4
3)  sudo vi /boot/config.txt
    add overlay=w1-gpio
4)  Reboot tinkerboard and the /sys/bus/w1/devices/w1_bus_master1 is generated.
5) GPIO0B0 (The 7th leg of 40Pin) is 1-wire Pin
Hope helps you

Joe

Hi, can you re-upload file please?

Share this post


Link to post
Share on other sites

hello @Shadway

joe has re-uploaded the file, let us know if you have any questions, thank you.

Share this post


Link to post
Share on other sites
7 hours ago, tooz said:

hello @Shadway

joe has re-uploaded the file, let us know if you have any questions, thank you.

Hi, tooz. Unfortunately it doesn't work. The /sys/bus/w1/devices/w1_bus_master1 doesn't generated.

Share this post


Link to post
Share on other sites

Hi Shadway:

tinker2_kernel_1-wire_20220629.zip
1)  copy boot.img to tinker2
2)  sudo dd if=boot.img of=/dev/mmcblk1p4
3)  sudo vi /boot/config.txt
    add overlay=w1-gpio
4)  Reboot tinker2 and the /sys/bus/w1/devices/w1_bus_master1 is generated.
5) GPIO2B2 (The 5th Pin of 40Pin) is 1-wire Pin
Hope helps you

Share this post


Link to post
Share on other sites

Hello, I'm trying to install openvpn but system reports it don't have tun/tap module. If is it possibility to run openvpn on this board?

Share this post


Link to post
Share on other sites

Hello,

I am using a ThinkerBoard, Tinker OS (Tinker_Board-Debian-Buster-v3.0.11-20211026) and I have the same issue with Wireguard.

Error.

Quote

$ wg-quick up wg0
[#] ip link add wg0 type wireguard
RTNETLINK answers: Operation not supported
Unable to access interface: Protocol not supported
[#] ip link delete dev wg0
Cannot find device "wg0 

I verify that I am up to date.

Quote

sudo apt update && sudo apt upgrade

The kernel version is.

Quote

uname -r
4.4.194

Everything points to a headers issue, but I haven't found a solution.

Quote

modprobe wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.4.194

I search for the headers with the same kernel version (4.4.194).

Quote

apt list linux-headers-4.*

But the most similar is 4.19.*,.

What is recommended in these cases?
- Keep looking for the headers (4.4.194).
- Look for another kernel and install the headers?

I even ran a test, install a new kernel and header version.

Quote

apt-get install linux-image-4.19.0-23-armmp linux-headers-4.19.0-23-armmp

reboot
apt install --reinstall wireguard wireguard-dkms

(Its armmp version ok?)

Reinstall the app.

Quote

apt install --reinstall wireguard wireguard-dkms

Looks that its installed on the new kernel version 4.19.0.23.

Setting up wireguard-dkms (1.0.20210219-1~bpo10+1) ...
Loading new wireguard-1.0.20210219 DKMS files...
It is likely that 4.4.194 belongs to a chroot's host
Building for 4.19.0-23-rt-armmp
Building initial module for 4.19.0-23-rt-armmp
Done.

wireguard.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.19.0-23-rt-armmp/updates/dkms/

depmod...

DKMS: install completed.
Setting up wireguard (1.0.20210223-1~bpo10+1) ...

But I have the same problem, it doesn't seem to recognize it. It still refers to the previous kernel.

Quote

modprobe wireguard
modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.4.194

If anyone has an idea? :)

Regards.

Share this post


Link to post
Share on other sites

Hello,

Searching the forum I found another similar topic, where they share the download link for the headers (linux-headers-4.4.194_4.4.194-7_armhf.deb).
Once downloaded, installed reboot, then reinstall the wireguard, reboot and run.

Quote

dpkg -i linux-headers-4.4.194_4.4.194-7_armhf.deb

reboot

 

Quote

 

apt install --reinstall wireguard wireguard-dkms

reboot

 

 

Quote

wg-quick up wg0

 

Regards.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...