Load additional kernel module

Is there a way to enforce HassIO to load an additional kernel module? So basically run a modprobe xxxx during startup.
Reason for asking: I do have a document scanner connected to my Raspberry and want to expose that device via usbip to other hosts in the network.

No, there isn’t as far as I know. For stuff like this it would be better to go with a Home Assistant Supervised install, which will give you full access to the host system, you maintain it yourself, you can install whatever you want etc. and you still keep the benefits like add-ons, automatic backups etc.

1 Like

Meanwhile I’ve found a solution:

2 Likes

does this change persist after rebooting the system?

It does, just tried it.

1 Like

Be interesting to see what happens after an OS update though.

I’ll report once a new update gets installed.

1 Like

And, did you already do an update?

Not yet, meanwhile I’ve switch hardware to a Homeassistant Blue. Will keep an eye on it.

Hi, quick question, i need an extra module named “can”
so i this folder, “/etc/modules-load.d/” i created a file “can.conf” , with “can” as content
rebooted HassOS

but when i do a modprobe can, it still fails? Do i need to add an additional “.bin” file too? what am i missing?

image

suspicion: you’ve used the normal ssh and you don’t have enable ssh on the host as described in https://developers.home-assistant.io/docs/operating-system/debugging/ ?
On host level you should see an /lib/modules/<version> folder.

yeah, i am on host, on port 22222 , see my screenshot above, i see a /lib/modules/5.4.94 folder

Oh, i’ve overseen this.

Do you have a can.ko inside? try find /lib/modules -name can.ko ?

nope, no hits :frowning:

Looks like that the ARM kernel does not have these modules bundled.

i am out of luck? no way to add those?

While researching this I found this interesting documentation. Apparantly the USB can be used for more than just filling an authorized_keys file:

link

Specifically in this case you can use it to add files to /etc/modules-load.d or /etc/modbprobe.d

/etc/modules-load.d is persistent and you can add your configuration files there. See Systemd modules load. You can add the modules configuration files in /etc/modprobe.d

This persists and will be reloaded when updating

1 Like

I also found out while posting this on the Home assistant OS github that the USBIP kernel modules have been added through a commit:

Enable USB/IP kernel modules (#2047)

So something is happening over there as well