Load Modules at Boot With modules-load.d and Set Options in modprobe.d
Load a kernel module at every boot with /etc/modules-load.d and set its options in /etc/modprobe.d; the file formats, ordering, initramfs and how to verify.

Two directories, two jobs
Loading a module by hand with modprobe lasts until the next reboot. Making it permanent needs two separate settings, and they live in two different places:
**
/etc/modules-load.d/** answers "which modules should be loaded at boot?"**
/etc/modprobe.d/** answers "when this module is loaded, with what options, aliases or rules?"
People mix them up because both are directories of small .conf files that mention module names. This post shows the exact format of each, how they interact, where the initramfs enters the story and how to check the result. The files are those read by systemd-modules-load and modprobe (kmod 33) on a systemd distribution with Linux 6.12 LTS, as described in modules-load.d(5) and modprobe.d(5).
modules-load.d: what to load at boot
A file named /etc/modules-load.d/<name>.conf lists modules, one per line. The service systemd-modules-load.service reads all such files early in boot and runs modprobe for each name.
dummy
loopThe file may also contain comment lines that begin with # or ;, and blank lines are ignored. Put the module names only, with no parameters: options belong in the other directory. The file name is yours to choose, and files are read in lexicographic order, with /etc/modules-load.d taking precedence over /usr/lib/modules-load.d for the same file name, so packages ship defaults in /usr/lib and administrators override in /etc.
Debian also supports the older /etc/modules, a plain list of module names read by the same machinery. Prefer the modules-load.d directory in new setups, since it works the same on every systemd distribution.
When it runs
The service runs after the basic system is up, before most other services, so a module loaded here is available to later units. If a listed module does not exist, the service logs an error and continues with the next, and the boot continues.
modprobe.d: how to load it
Files /etc/modprobe.d/*.conf configure modprobe itself. They are read every time modprobe runs, including loads triggered by hardware, by the kernel's request_module and by your own commands. The common directives:
options dummy numdummies=2
alias fastnic e1000e
softdep mymod pre: helper
install mymod /sbin/modprobe --ignore-install mymod && /usr/local/bin/after-mymod.shIn order, the four lines pass options every time the module loads, make a friendly alias for a module, ask for a helper module to be tried first without failing when it is missing, and run a command in place of the plain load, here one that loads the module and then runs a script.
The options line is the one used most. Its parameters correspond to the module parameters of the earlier post on module_param: the module name followed by name=value pairs, applied on every load whether you or the system asks. A blacklist uses the same directory and is the subject of the next post.
Order matters only within a directive for the same module: options lines for one module accumulate, so a later file adding options dummy numdummies=2 does not remove an earlier one setting a different parameter, though a repeated parameter takes the last value modprobe reads. Files are read in lexicographic order, and a convention is to prefix names with numbers (10-network.conf).
Combine them
To load dummy at boot with two interfaces, you need both:
echo dummy | sudo tee /etc/modules-load.d/dummy.conf
echo 'options dummy numdummies=2' | sudo tee /etc/modprobe.d/dummy.confdummy
options dummy numdummies=2At boot, systemd-modules-load runs modprobe dummy, which reads the options line and loads the module with numdummies=2. After the next boot the interfaces exist:
ip -br link show type dummydummy0 DOWN 7a:3c:f1:02:9e:b4 <BROADCAST,NOARP>
dummy1 DOWN 2e:84:6d:1a:77:c0 <BROADCAST,NOARP>The MAC addresses are random. If you use only the first command, the module loads with its default of one device. If you use only the second, nothing loads the module at boot, and the options sit unused until someone does.
Verify without rebooting
Check each file and the combined result with tools instead of waiting for a boot:
systemd-analyze cat-config modules-load.d | grep -v -e '^#' -e '^;'
sudo systemctl restart systemd-modules-load.service
lsmod | grep -E '^(dummy|loop)'
modprobe --showconfig | grep -E '^options dummy'dummy
loop
dummy 12288 0
loop 45056 0
options dummy numdummies=2systemd-analyze cat-config prints the merged modules-load.d files as the service would read them, with the comment lines filtered here. Restarting the service reruns the load. modprobe --showconfig (also -c) prints the whole configuration modprobe has parsed, and the grep finds your option, which is the fastest way to catch a typo or a file in the wrong directory. Sizes will differ.
The initramfs: early loading
Some modules are needed before the root file system is mounted: storage and file system drivers. The initramfs contains its own copy of the module files and its own subset of the configuration. If you change /etc/modprobe.d/ for such a module, the initramfs does not see it until you regenerate it:
sudo update-initramfs -u ## Debian and Ubuntu
sudo dracut --force ## Fedora and RHEL
sudo mkinitcpio -P ## ArchThe symptom of forgetting is a setting that works after boot when you run modprobe manually and not at boot. On Debian, the file /etc/initramfs-tools/modules lists extra modules for the initramfs, and dracut uses add_drivers+= in /etc/dracut.conf.d/. Modules not needed for mounting root can load later through modules-load.d and need no initramfs change.
Troubleshooting
The module does not load at boot. Check the service: systemctl status systemd-modules-load.service and journalctl -b -u systemd-modules-load. A misspelled name or a module missing for the running kernel is reported there.
Options are ignored. The module was loaded earlier, from the initramfs, with the older configuration. Regenerate the initramfs.
It loads, but with the wrong value. A later file in lexicographic order, or an options line on the kernel command line (module.param=value), overrides yours. Use modprobe --showconfig and cat /proc/cmdline to see all sources.
Not found on the second boot after an update. The module is out of tree and was built for the old kernel. DKMS, from the previous post, rebuilds it.
Choosing which directory a setting belongs in
A quick test avoids most mistakes. If the question is "should this module be present after boot?", the answer goes in modules-load.d. If the question is "how should it behave whenever it is loaded, by anyone?", the answer goes in modprobe.d. Hardware drivers usually need only the second, because the kernel and udev load them automatically when the device appears, and a modules-load.d entry for a driver of present hardware is redundant. The first is for modules nobody would ask for by themselves: a virtual network device, a loopback block driver, a file system you mount rarely, br_netfilter or overlay for a container runtime, or a kernel feature module such as vfio-pci.
Package maintainers follow the same rule. A package that needs a module ships a file in /usr/lib/modules-load.d/, and a package that wants to tune one ships a file in /usr/lib/modprobe.d/. Your own files in /etc override theirs by name, so you never edit a packaged file: copy it to /etc with the same name and change the copy, or mask it by linking the name to /dev/null. Keeping local changes in /etc means a package upgrade never overwrites them.


