「Linux」- 开机启动时自动加载内核模块 @20210425

CentOS 6.5

Remember to load your kernel modules at boot
How to load modules on boot CentOS 6.x

以BONDING模块为例:

#!/bin/sh

cat > /etc/sysconfig/modules/bonding.modules <<EOF
#!/bin/sh
exec /sbin/modprobe bonding 2>&1
EOF

chmod 755 /etc/sysconfig/modules/bonding.modules

CentOS 7.4

Products & Services/Product Documentation/Red Hat Enterprise Linux/7.4/Kernel Administration Guide

以virtio-net.ko模块为例:

#!/bin/sh

cat > /etc/modules-load.d/virtio-net.conf <<EOF
# Load virtio-net.ko at boot
virtio-net
EOF


相关文章

「Linux」- 内核升级
「CentOS 7」- dracut-initqueue timeout
「Debian」- 禁用Nouveau驱动
「CentOS 7」- Disable plymouth
「Linux」- control groups
「sysctl」- 停止内核向控制台输出消息

posted @ 2021-04-25 21:05  研究林纳斯写的  阅读(445)  评论(0编辑  收藏  举报