我修改了r8169驱动,现在要用修改后的驱动取代原有r8169。我就把原有的删掉了,可是重启后发现加载的仍然是原有的驱动。我修改过的没有加载。
是不是我还得修改initrd,删掉里面的r8169才行啊?
应该怎么做?作者: hukb_cu 时间: 2011-10-19 17:30
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.作者: dooros 时间: 2011-10-20 00:30
需要重建initrd,另外,你测试了你的模块在当前内核能加载不 ?作者: lxl8768 时间: 2011-10-20 10:24
谢谢大家,问题解决了,重新mkinitramfs一下就可以了,应该是initrd里包含了r8169,加载过后也就不再加载我放在/lib/modules目录的驱动了。感谢各位帮助