如何在 Linux 中禁用特定模块的自动加载
How to disable the autoloading of a specific module in Linux
我根据 Linux 设备驱动程序 第 4 章:调试技术编译了我的 Linux 内核。在我加载我的第一个 hello world 模块然后通过 dmesg
检查输出后,我只能看到 evbug: .......
.
我知道我可以通过执行 sudo rmmod evbug
关闭 evbug
的输出。但是,显然,每次重启后都执行这个命令是不方便的。
如何禁用此模块的自动加载?我只是想在需要的时候手动加载它。
您需要将模块列入黑名单。对于 debian 系统,请参阅 https://wiki.debian.org/KernelModuleBlacklisting. For redhat systems see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/rescuemode_drivers-blacklisting.html
我根据 Linux 设备驱动程序 第 4 章:调试技术编译了我的 Linux 内核。在我加载我的第一个 hello world 模块然后通过 dmesg
检查输出后,我只能看到 evbug: .......
.
我知道我可以通过执行 sudo rmmod evbug
关闭 evbug
的输出。但是,显然,每次重启后都执行这个命令是不方便的。
如何禁用此模块的自动加载?我只是想在需要的时候手动加载它。
您需要将模块列入黑名单。对于 debian 系统,请参阅 https://wiki.debian.org/KernelModuleBlacklisting. For redhat systems see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Installation_Guide/rescuemode_drivers-blacklisting.html