Override modprobe.d blacklist

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












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:



  1. Add iTCO_wdt to /etc/modules (which is symlinked to /etc/modules-load.d/modules.conf)

  2. Comment-out the blacklist iTCO_wdt line 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[331]: 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/*
/lib/modprobe.d/blacklist_linux_4.15.0-20-generic.conf
/lib/modprobe.d/blacklist_linux_4.15.0-23-generic.conf


I found that each file did affect the modprobe behavior, which is surprising, because I would not expect the linux_4.15.0.20-generic.conf file to affect the machine's behavior when linux_4.15.0.23-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_wdt line 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?







share|improve this question















  • 1




    Not sure if this works: create an alias for iTCO_wdt (in a config that is parsed before the others...)
    – Nils
    Jun 21 at 16:17










  • Thanks for the suggestion. I added the line alias iTCO_wdt my_wdt in /etc/modprobe.d/00-iTCO-alias.conf, and changed iTCO_wdt to my_wdt in /etc/modules, but syslog now shows systemd-modules-load[371]: Failed to find module 'my_wdt'. It seems that systemd-modules-load does not understand modprobe aliases?
    – millinon
    Jun 21 at 16:34






  • 1




    @millinon the declaration goes the other way round: alias my_wdt iTCO_wdt (see man modprobe.d).
    – Stephen Kitt
    Jun 21 at 16:38










  • Yikes, you're right. I switched it, and systemd-modules-load still reports that iTCO_wdt is blacklisted, even though I have the module listed as my_wdt in /etc/modules.
    – millinon
    Jun 21 at 16:44














up vote
3
down vote

favorite
1












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:



  1. Add iTCO_wdt to /etc/modules (which is symlinked to /etc/modules-load.d/modules.conf)

  2. Comment-out the blacklist iTCO_wdt line 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[331]: 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/*
/lib/modprobe.d/blacklist_linux_4.15.0-20-generic.conf
/lib/modprobe.d/blacklist_linux_4.15.0-23-generic.conf


I found that each file did affect the modprobe behavior, which is surprising, because I would not expect the linux_4.15.0.20-generic.conf file to affect the machine's behavior when linux_4.15.0.23-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_wdt line 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?







share|improve this question















  • 1




    Not sure if this works: create an alias for iTCO_wdt (in a config that is parsed before the others...)
    – Nils
    Jun 21 at 16:17










  • Thanks for the suggestion. I added the line alias iTCO_wdt my_wdt in /etc/modprobe.d/00-iTCO-alias.conf, and changed iTCO_wdt to my_wdt in /etc/modules, but syslog now shows systemd-modules-load[371]: Failed to find module 'my_wdt'. It seems that systemd-modules-load does not understand modprobe aliases?
    – millinon
    Jun 21 at 16:34






  • 1




    @millinon the declaration goes the other way round: alias my_wdt iTCO_wdt (see man modprobe.d).
    – Stephen Kitt
    Jun 21 at 16:38










  • Yikes, you're right. I switched it, and systemd-modules-load still reports that iTCO_wdt is blacklisted, even though I have the module listed as my_wdt in /etc/modules.
    – millinon
    Jun 21 at 16:44












up vote
3
down vote

favorite
1









up vote
3
down vote

favorite
1






1





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:



  1. Add iTCO_wdt to /etc/modules (which is symlinked to /etc/modules-load.d/modules.conf)

  2. Comment-out the blacklist iTCO_wdt line 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[331]: 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/*
/lib/modprobe.d/blacklist_linux_4.15.0-20-generic.conf
/lib/modprobe.d/blacklist_linux_4.15.0-23-generic.conf


I found that each file did affect the modprobe behavior, which is surprising, because I would not expect the linux_4.15.0.20-generic.conf file to affect the machine's behavior when linux_4.15.0.23-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_wdt line 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?







share|improve this question











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:



  1. Add iTCO_wdt to /etc/modules (which is symlinked to /etc/modules-load.d/modules.conf)

  2. Comment-out the blacklist iTCO_wdt line 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[331]: 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/*
/lib/modprobe.d/blacklist_linux_4.15.0-20-generic.conf
/lib/modprobe.d/blacklist_linux_4.15.0-23-generic.conf


I found that each file did affect the modprobe behavior, which is surprising, because I would not expect the linux_4.15.0.20-generic.conf file to affect the machine's behavior when linux_4.15.0.23-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_wdt line 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?









share|improve this question










share|improve this question




share|improve this question









asked Jun 21 at 16:10









millinon

1638




1638







  • 1




    Not sure if this works: create an alias for iTCO_wdt (in a config that is parsed before the others...)
    – Nils
    Jun 21 at 16:17










  • Thanks for the suggestion. I added the line alias iTCO_wdt my_wdt in /etc/modprobe.d/00-iTCO-alias.conf, and changed iTCO_wdt to my_wdt in /etc/modules, but syslog now shows systemd-modules-load[371]: Failed to find module 'my_wdt'. It seems that systemd-modules-load does not understand modprobe aliases?
    – millinon
    Jun 21 at 16:34






  • 1




    @millinon the declaration goes the other way round: alias my_wdt iTCO_wdt (see man modprobe.d).
    – Stephen Kitt
    Jun 21 at 16:38










  • Yikes, you're right. I switched it, and systemd-modules-load still reports that iTCO_wdt is blacklisted, even though I have the module listed as my_wdt in /etc/modules.
    – millinon
    Jun 21 at 16:44












  • 1




    Not sure if this works: create an alias for iTCO_wdt (in a config that is parsed before the others...)
    – Nils
    Jun 21 at 16:17










  • Thanks for the suggestion. I added the line alias iTCO_wdt my_wdt in /etc/modprobe.d/00-iTCO-alias.conf, and changed iTCO_wdt to my_wdt in /etc/modules, but syslog now shows systemd-modules-load[371]: Failed to find module 'my_wdt'. It seems that systemd-modules-load does not understand modprobe aliases?
    – millinon
    Jun 21 at 16:34






  • 1




    @millinon the declaration goes the other way round: alias my_wdt iTCO_wdt (see man modprobe.d).
    – Stephen Kitt
    Jun 21 at 16:38










  • Yikes, you're right. I switched it, and systemd-modules-load still reports that iTCO_wdt is blacklisted, even though I have the module listed as my_wdt in /etc/modules.
    – millinon
    Jun 21 at 16:44







1




1




Not sure if this works: create an alias for iTCO_wdt (in a config that is parsed before the others...)
– Nils
Jun 21 at 16:17




Not sure if this works: create an alias for iTCO_wdt (in a config that is parsed before the others...)
– Nils
Jun 21 at 16:17












Thanks for the suggestion. I added the line alias iTCO_wdt my_wdt in /etc/modprobe.d/00-iTCO-alias.conf, and changed iTCO_wdt to my_wdt in /etc/modules, but syslog now shows systemd-modules-load[371]: Failed to find module 'my_wdt'. It seems that systemd-modules-load does not understand modprobe aliases?
– millinon
Jun 21 at 16:34




Thanks for the suggestion. I added the line alias iTCO_wdt my_wdt in /etc/modprobe.d/00-iTCO-alias.conf, and changed iTCO_wdt to my_wdt in /etc/modules, but syslog now shows systemd-modules-load[371]: Failed to find module 'my_wdt'. It seems that systemd-modules-load does not understand modprobe aliases?
– millinon
Jun 21 at 16:34




1




1




@millinon the declaration goes the other way round: alias my_wdt iTCO_wdt (see man modprobe.d).
– Stephen Kitt
Jun 21 at 16:38




@millinon the declaration goes the other way round: alias my_wdt iTCO_wdt (see man modprobe.d).
– Stephen Kitt
Jun 21 at 16:38












Yikes, you're right. I switched it, and systemd-modules-load still reports that iTCO_wdt is blacklisted, even though I have the module listed as my_wdt in /etc/modules.
– millinon
Jun 21 at 16:44




Yikes, you're right. I switched it, and systemd-modules-load still reports that iTCO_wdt is blacklisted, even though I have the module listed as my_wdt in /etc/modules.
– millinon
Jun 21 at 16:44















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451143%2foverride-modprobe-d-blacklist%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451143%2foverride-modprobe-d-blacklist%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Christian Cage

How to properly install USB display driver for Fresco Logic FL2000DX on Ubuntu?