Chinaunix

标题: debian的驱动模块在哪里? [打印本页]

作者: lxl8768    时间: 2011-10-19 16:18
标题: debian的驱动模块在哪里?
debian的驱动模块在哪里?我把/lib/modules下的网卡模块r8169删除掉了,为什么重启后lsmod仍然有r8169。

如果我想使用新的驱动并系统启动时加载应该怎么做?
作者: wttaurus    时间: 2011-10-19 16:33
为什么不直接更新呢?
apt-get update
apt-get upgrade
作者: lxl8768    时间: 2011-10-19 16:52
回复 2# wttaurus


    我修改了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目录的驱动了。感谢各位帮助




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2