免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5512 | 回复: 5
打印 上一主题 下一主题

debian的驱动模块在哪里? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-10-19 16:18 |只看该作者 |倒序浏览
debian的驱动模块在哪里?我把/lib/modules下的网卡模块r8169删除掉了,为什么重启后lsmod仍然有r8169。

如果我想使用新的驱动并系统启动时加载应该怎么做?

论坛徽章:
0
2 [报告]
发表于 2011-10-19 16:33 |只看该作者
为什么不直接更新呢?
apt-get update
apt-get upgrade

论坛徽章:
0
3 [报告]
发表于 2011-10-19 16:52 |只看该作者
回复 2# wttaurus


    我修改了r8169驱动,现在要用修改后的驱动取代原有r8169。我就把原有的删掉了,可是重启后发现加载的仍然是原有的驱动。我修改过的没有加载。
是不是我还得修改initrd,删掉里面的r8169才行啊?
应该怎么做?

论坛徽章:
0
4 [报告]
发表于 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.

论坛徽章:
4
CU大牛徽章
日期:2013-03-13 15:29:07CU大牛徽章
日期:2013-03-13 15:29:49CU大牛徽章
日期:2013-03-13 15:30:192015年迎新春徽章
日期:2015-03-04 09:57:09
5 [报告]
发表于 2011-10-20 00:30 |只看该作者
需要重建initrd,另外,你测试了你的模块在当前内核能加载不 ?

论坛徽章:
0
6 [报告]
发表于 2011-10-20 10:24 |只看该作者
谢谢大家,问题解决了,重新mkinitramfs一下就可以了,应该是initrd里包含了r8169,加载过后也就不再加载我放在/lib/modules目录的驱动了。感谢各位帮助
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP