把/lib/modules下的网卡模块r8169删除掉了,为什么重启后lsmod仍然有r8169。
经过查询,是由于initrd已经包含了驱动,所以会自动加载,
After installing the driver, update the module dependencies. depmod -a First the r8169 network driver needs to be blacklisted in order to prevent the kernel from loading it. Note If additional NICs are installed in the server, the module must not be blacklisted. Debian: echo "blacklist r8169" >> /etc/modprobe.d/blacklist Then we force the kernel to include the driver in the initrd. This also ensures, that the new r8168 module is loaded before the r8169 module. echo "r8168" >> /etc/initramfs-tools/modules And rebuild the initrd update-initramfs -v -u -k `uname -r` Now you can reboot to activate the driver. |