How to blacklist a Kernel Module in CentOS
How to blacklist a Kernel Module in CentOS are an important piece of knowledge for the sysadmin. In Centos Linux, the preventing a kernel module from loading during boot is also called blacklisting. We Add the module name into the blacklist file. We must remove the module from THE/ETC/MODPROBE.D,/etc/modprobe.conf,/etc/rc.modules and the/etc/sysconfig/modules/* F older. For each respective Red Hat versions, you must execute the following commands:
Blacklisting Centos 5 and 6 kernel module
ADD the kernel module to is blacklisted into the blacklist.conf file. DO:
echo "blacklist the_module name" >>/etc/modprobe.d/blacklist.conf
As an example:
echo "Blacklist qlgc-5.8 >>/etc/modprobe.d/blacklist.conf
If The module is blacklisting is a dependency of another module, the blacklsting would fail. It'll be loaded.
Blacklisting a Centos 4 kernel module
# echo "Alias <module-name> off" >>/etc/modprobe.conf
If you want to remove the module for testing purposes or temporarily, you can remove the already loaded module by
Running
# modprobe-r Module_name_goes_here
Ie.
# modprobe-r QLGC
This article from "Vincent" blog, declined reprint!
How to blacklist a Kernel Module in CentOS