OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: cugerm on February 24, 2022, 10:56:11 am

Title: Load bnxt network interface card module before installation
Post by: cugerm on February 24, 2022, 10:56:11 am
Hello,

I am installing OPNsense for the first time and not sure if I have a OPNsense or FreeBSD question:

The first (console based) installation step doesn't list all network interfaces. It is missing two bnxt interfaces. I tried to enable the bnxt module in FreeBSD Boot-Stage-Three:

Boot Menu -> 3 (Escape to loader prompt)
OK  set if_bnxt_load="YES"
OK  boot
Loading kernel...


But the two nics are still missing. Is it possible to load the bnxt module before installation?

Thank you and best
Title: Re: Load bnxt network interface card module before installation
Post by: Patrick M. Hausen on February 24, 2022, 02:25:51 pm
Code: [Select]
load /boot/kernel/kernel
load /boot/kernel/if_bnxt.ko
boot

Or some similar invocation should do it. Typing from memory, I don't have a system or time  to try before posting just right now.

HTH,
Patrick
Title: Re: Load bnxt network interface card module before installation
Post by: cugerm on February 24, 2022, 06:49:39 pm
Ah, thank you. I tried to load the module but without loading the kernel before (I didn't realize that I can enter more commands after kernel loading). Ok, your commands work: They load the kernel and the module and then start the kernel. But unfortunately the boot process aborts at a later point due to read-only file system:

Code: [Select]
Press any key to start the configuration importer: ........
mkdir: /conf/backup: Read-only file system
...: Read-only file system
override r--r--r-- root/wheel for /var/run/ld-elf32.so.hints?

Do I miss a (kernel) boot flag to force read-write access?


FYI: I also tried:

Code: [Select]
Boot Menu -> 3 (Escape to loader prompt)
OK  unload
OK  set if_bnxt_load="YES"
OK  boot-conf
Loading kernel...

But I doesn't load the bnxt module.

Thanks again


Title: Re: Load bnxt network interface card module before installation
Post by: cugerm on February 26, 2022, 04:05:50 pm
To answer my newbie question finally: I failed to activate the module in the early startup phase (FreeBSD Boot-Stage3). Therefore the bnxt NICs were not available during the initial OPNsense installation steps (within the console). Instead, the module must be activated via OPNsense configuration after installation and then the network interfaces must be reconfigured. Instructions for loading modules can be found in the relevant FreeBSD file /boot/loader.conf:

Code: [Select]
# OPNsense console menu: 8->Shell

root$  ls /boot/kernel/*bnxt*        # check if module exists
/boot/kernel/if_bnxt.ko

root$ cat /boot/loader.conf
...
# In order to deploy a custom change to this installation,
# please use /boot/loader.conf.local as it is not rewritten,
# or better yet use System:Settings:Tunables from the GUI.
...

So to load bnxt, the System/Settings/Tunables entry if_bnxt_load with the value YES is added in the web GUI. After a subsequent reboot, all my network interfaces were available.