问题描述
如何禁用加载不必要的内核模块。内核3.2.4
最佳解决办法
Note: blacklisting will not work for modules which are built into the kernel image (i.e. not loaded via a separate .ko file. The only way to disable such modules is via a kernel parameter (if available) or by recompiling the kernel.
只需打开您的/etc/modprobe.d/blacklist文件并使用以下语法添加drivername:
blacklist driver-name
编辑:在12.10(12.04?)以后的版本中,文件是/etc/modprobe.d/blacklist.conf
重新启动您的盒子并使用lsmod命令显示Linux内核中模块的状态
注意:此处driver-name是您所需的黑名单驱动程序的名称。例如,如果要禁用NIC卡驱动程序,可以使用终端中的命令lspci -v命令找到LAN卡的内核驱动程序名称。例如,我的输出是:
........
........
6:00.0 Ethernet controller: Broadcom Corporation NetLink BCM5906M Fast Ethernet PCI Express (rev 02)
Subsystem: Lenovo Device 3861
Flags: bus master, fast devsel, latency 0, IRQ 46
Memory at b8000000 (64-bit, non-prefetchable)