Closed karlgrose closed 7 months ago
Hi @karlgrose, thanks for calling my attention to this problem! That is a curious use case that has managed to escape my attention so far, but it is completely valid. The primary purpose of the VMM_KO
variable used to be supporting the use of custom-built vmm
kernel modules (such as the one that bhyve+
offered).
On the other hand, as you have also explored this in your workaround, the wifibox
script allows overriding of VMM_KO
from the environment as an implicit extensibility measure and as part of a better code structure. Due to the support for bhyve+
, version 0.12.0
of the net/wifibox-core
port can also control the VMM_KO
variable because the default of this came from the Makefile
. That latter is now gone by the recent changes about sunsetting the byhve+
support but it could be restored to keep providing support for this scenario.
That said, I believe the workaround of yours can be improved by setting the value of the VMM_KO
on the installation of net/wifibox-core
:
# make install VMM_KO=$(sysctl -n kern.module_path | cut -d ';' -f 1)/vmm.ko
But I think it is possible to go further with this and teach the wifibox
script how to find vmm.ko
for itself automatically, so no workaround would be needed at all.
@karlgrose did the approach work for you that I suggested in my previous comment?
As a test, removing the /etc/rc.conf.d/wifibox
file and then directly modifying the wifibox script itself to start with a smarter initial value for VMM_KO:
: "${VMM_KO:=$(sysctl -n kern.module_path | cut -d ';' -f 1)/vmm.ko}"
did allow it to run with both of the latest 15.0-CURRENT kernels in question. I have also locked the wifibox-1.3.0 package on my systems to keep this version for now.
Okay, thanks for the confirmation. I will create a fix for this problem, so you will get this feature in the next version.
I have created an updated version of the net/wifibox-core
port, please test it: https://github.com/pgj/freebsd-wifibox-port/tree/wifibox-core/update-20240306 .
I installed this update-20240306 version of wifibox-core and had no issues whether using the standard or alternative 15.0-CURRENT kernel. Thanks for the fix.
Description
When using FreeBSD 15.0-CURRENT with an alternative kernel, /boot/kernel.GENERIC-NODEBUG, wifibox fails to start with errors reported in /var/log/wifibox and dmesg as shown in the logs section below.
Host operating system
Wireless NIC
Wifibox version
Disk image type and version
wifibox:~# uname -a Linux wifibox 6.1.54-0-lts #1-Alpine Wed, 20 Sep 2023 08:50:17 +0000 x86_64 GNU/Linux
Changes to the default configuration files
(Workaround solution)
This override for the VMM_KO wifibox service variable avoids the errors reported in this issue report:
Logs
Additional context
I found that by overriding the VMM_KO variable using /etc/rc.conf.d/wifibox as noted above in the Changes section, the wifibox service then will load without error and work as expected for both the alternative kernel module, /boot/kernel.GENERIC-NODEBUG/vmm.ko, when booting that flavor kernel and for the default generic module, /boot/kernel/vmm.ko, when booting that GENERIC kernel.
Have you tried to turn it on and off?