SOLVED How to load extra drivers between upgrades to prevent getting stuck before it loads the web interface?

rodrigoelp

Dabbler
Joined
Sep 27, 2022
Messages
10
Hello peeps,

A while ago I wrote a post about me having trouble booting truenas after I upgraded to 13.0 U2, my issue was the fact my motherboard uses a realtec nic, which isn't loaded automatically after U2 installed.

That sparked two questions I haven't been able to find the answer by myself:

  1. Is there a mechanism for me to execute a shell script (or anything really) after I press the "upgrade" button in the truenas user interface? I want to be able to enable my nic driver after an update finished.
  2. If there is no way to execute post install steps, is there a way for me to specialise the image prior installing it so I can configure it with the appropriate drivers to run once installed?
I want to be prepared when an update comes out.
 

rodrigoelp

Dabbler
Joined
Sep 27, 2022
Messages
10
I posted in a different thread/forum by mistake (and probably got removed).

In any case, a helpful user commented I should check tunables to get my problem solved.
After reading tunables, the examples were of some help, though I dreaded to test it out.

Today, I had some time to test this. moved the load of my realtek module from `/boot/loader.conf` into tuneables, restarted the machine... and it loaded it, no problems.

For reference, the line I added to the `loader.conf` and tunable was

```
if_re_load="YES"
```

The second test is the upgrade process (I had core u13.0 U2, and I upgraded to 13.0 U5). I prepared my graphics card in case things were going to go south, and waited for the restart to finish.

A minute later, the machine came back.

I want to thank whoever suggested tuneables.

I am coming back to linux after years of macOS, and I can confidently say I was more anxious than I should because the computer I am using was custom built to contain my wife's life and mine in there. The reason I took the risk now is, I know it finished the backup to glacier, so I could risk losing everything.

In any case, if there is anyone new to truenas/linux in here, and you are trying to get your own driver to work, I'll leave this comment here in case you find this helpful.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Are you using iSCSI? The reason the realtek driver was disabled is that this combination might lead to data corruption. Second, TrueNAS CORE is not Linux :wink:
 

rodrigoelp

Dabbler
Joined
Sep 27, 2022
Messages
10
TrueNAS CORE is not Linux
I stand corrected, bsd :D

Still, I had a lot of things I couldn't really figure out from the get go.

Are you using iSCSI?
Nope, I don't actually need it.
Most of the computers requiring access to the NAS are connected to the 2.5 Gbit switch and samba does the work I need in those instances.

I would have installed another card to do the work, but I need the pci port for the hba.

Thanks for the warning though.
 
Top