Hello all,
Where do I put a file to load a kernel module, or list of kernel modules, at boot? Is it /etc/modprobe.d/?
Thank you for any help!
wiki.archlinux.org still working ;-)
why you not ask there? https://wiki.archlinux.org/index.php/Kernel_module (ignoring the part about systemd)
necessary modules for boot you can add in to /etc/mkinitcpio.conf too https://wiki.archlinux.org/index.php/Mkinitcpio
Well, I didn't know if it was any different than Arch Linux, since it seems that kernel modules with Arch Linux tends to be linked to systemd (that's what it looked like on the kernel module archwiki page I have looked at, but maybe not enough...), but I don't know enough to tell if it is or not. I appreciate your help. :) Thanks for the link on mkinitcpio, I didn't know about it. I'll look into this and post here if I run into any problems. :)
EDIT: I guess my real question then, is if putting a file like /etc/modules-load.d/virtio-net.conf with the module I want to load in it will work on Artix, since I don't have systemd.
it will works, if you put it in /etc/modprobe.d/ https://wiki.archlinux.org/index.php/Kernel_module#Using_files_in_/etc/modprobe.d/
EDIT: seems, modprobe.d can not load module without one of a parameter (install/blackist/alias/options)
Thanks Alium, I appreciate your help. This is why I wanted to clarify, as it doesn't say you can put modules there, but module settings.
what works (tested by myself) is puting your module for automaticaly load in /etc/conf.d/modules
[picasso alois]# cat /etc/conf.d/modules
# Linux users can define a list of modules for a specific kernel version,
# a released kernel version, a main kernel version or all kernel versions.
# The most specific versioned variable will take precedence.
# FreeBSD users can only use the modules="foo bar" setting.
modules="virtio_net"
after reboot i can see:
[picasso alois]# lsmod | grep virti
virtio_net 61440 0
net_failover 20480 1 virtio_net
Actually every init on artix should support /etc/modules-load.d/*.conf so that should actually work. You can set modules in mkinitcpio as well if you want though.
That not works for me, etc/modules-load.d not exist , and if I create it, system ignored it
Hmm, maybe I spoke too soon. runit and s6 run modules-load on boot which is a script that takes care of this. I assumed openrc did as well but I guess not?
Openrc modules service will use /usr/lib/modules-load.d or /run/modules-load.d or /etc/modules-load.d if it contains *.conf files.
How do I load them on dinit?
I tried /etc/modules and /etc/conf.d/modules, I had to create the files.
The modules service runs /usr/bin/modules-load which I assume is the same as for s6 and runit. It looks for *.conf files in each of /etc/modules-load.d, /run/modules-load.d, and /usr/lib/modules-load.d