Auto load kernel modules

最後更新: 2019-05-07

目錄

 


Centos 6

 

cd /etc/sysconfig/modules/

echo "#!/bin/sh
/sbin/insmod kvm
/sbin/insmod kvm-intel" >> mymodule.modules

chmod 755 mymodule.modules

 


Centos 7

 

The systemd-modules-load.service daemon will read these files and load the modules at boot

All configuration files are sorted by their filename in lexicographic order,

regardless of which of the directories they reside in.

  • /etc/modules-load.d/*.conf                # reserved for the local administrator (override /lib/)
  • /run/modules-load.d/*.conf
  • /usr/lib/modules-load.d/*.conf           # Packages should install their configuration files

Disable a configuration file supplied by the vendor

symlink configuration in /etc/  to /dev/null

 


 

 

 

 

Creative Commons license icon Creative Commons license icon