How to Blacklist a Kernel Module in CentOS

How to Blacklist a Kernel Module in CentOS

How to Blacklist a Kernel Module in CentOS is an important piece of knowledge for the sysadmin. In Centos Linux, 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/* folder. For each respective Red Hat versions, you must execute the following commands:

Blacklisting Centos 5 and 6 kernel module

Add the kernel module to be 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 you are blacklisting is a dependency of another module, the blacklsting will fail. It will 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


本文出自 “vincent” 博客,谢绝转载!

你可能感兴趣的:(folder,loading,important,Knowledge,following)