I am using Ubuntu 18.04. I'm trying to make a module load at boot; the module in question is iTCO_wdt. There are many questions about blacklisting a kernel module, but I am trying to whitelist one.
These are the steps I followed to try to make the module load at boot:
iTCO_wdtto /etc/modules (which is symlinked to /etc/modules-load.d/modules.conf)
- Comment-out the
blacklist iTCO_wdtline in /etc/modprobe.d/blacklist-watchdog.conf
I thought this would be sufficient, but syslog was still showing that the module was blacklisted:
systemd-modules-load: Module 'iTCO_wdt' is blacklisted
After some investigation, I found that the module was also blacklisted in several maintainer-installed blacklist files located in /lib/modprobe.d:
$ grep -l 'blacklist iTCO_wdt' /lib/modprobe.d/*
I found that each file did affect the modprobe behavior, which is surprising, because I would not expect the linux_126.96.36.199-generic.conf file to affect the machine's behavior when linux_188.8.131.52-generic is the current kernel.
After commenting out the
blacklist iTCO_wdt line in each of those files and rebooting, the module was automatically loaded, which is the desired behavior.
So, as I see it, there are a few ways I can make the module load even though it is blacklisted by a /lib/modprobe.d file:
- manually comment-out the
blacklist iTCO_wdtline in each file
- load the module in my own script that runs at boot
The issue is that future updates might install new /lib/modprobe.d blacklist files, which might re-blacklist iTCO_wdt. With this consideration, it seems that my best option is the last one, although I really don't like it since it relies on my own script instead of the built-in module loading system.
Considering that I don't want to edit the /lib/modprobe.d files after every kernel update, what is the best way to permanently whitelist the iTCO_wdt module in the module loading system?