loader.conf reverts changes on shutdown, making nic useless

Started by miniplex, June 18, 2023, 09:25:32 PM

Previous topic - Next topic
Hi everyone,

First time user here, and I've installed the latest OPNsense to a SSD, no issues there, but I had to add the RealTEK 8125B package to get it to recognize my NICs.  After adding the package, I have to add 2 lines in the /boot/loader.conf file to get the OS to see them, and use them.  I add

if_re_load="YES"
if_re_name="/boot/modules/if_re.ko"

save, then use the command reboot.  After it's done, I log in as root, assign one of the interfaces, and everything works flawlessly.  I can load the web GUI from my laptop, everything seems to function as it's supposed to. BUT, the moment I actually shut down, my /boot/loader.conf "forgets" the 2 lines of code I added, and I have to repeat in order for it to function.

Just incase this is the information needed:

OPNsense 23.1.9-amd64
FreeBSD 13.1-RELEASE-p7
OpenSSL 1.1.1t 7 Feb 2023

The RealTEK package I'm using:
https://mirrors.xtom.com/freebsd-pkg/FreeBSD%3A13%3Aamd64/quarterly/All/realtek-re-kmod-198.00_1.pkg

Use the UI to set these. System > Settings > Tunables.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)


Quote from: mimugmail on June 18, 2023, 10:38:34 PM
Or use loader.conf.local
But why? Use the friggin' UI. That's why it's there. This way a configuration backup and restore will contain whatever you configured.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

The GUI wasn't working for me,  but editing the loader.conf.local did the trick, thank you all

Why not use the plugin which does everything automatically?


Cheers,
Franco


> At least 3 ways to Rome

Yes, but:

1. Installed from wrong package site despite being available in our repository.
2. Ignored https://github.com/opnsense/core/blob/ca3945b8c/src/etc/rc.loader.d/00-banner#L4
3. Couldn't make System: Settings: Tunables work either. (There likely is no bug.)
4. Asks about it in the forum.

While the plugin does all of this correctly for you on the first try.


Cheers,
Franco