升级内核3.10到5.6后,无法识别网卡。表现:ip addr后无显示相关网卡
原因: 内核默认使用centos的网卡驱动r8169,但实际网卡是r8168,驱动不匹配.
boot.log爆错:Failed to start LSB: Bring up/down networking
#dmesg -d
Error: Connection activation failed: No suitable device found for this connection (device lo not available because device is strictly unmanaged).
查看使用的网卡驱动: # lspci -v
–拉到最后,能看到这样的信息(默认是显示r8169的,这里已经是我重装驱动后的结果了)
解决方案:
- 到官网下载匹配的最新的网卡驱动: https://www.realtek.com/zh-tw/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software
下载后解压,直接运行autorun.sh - 如果安装爆错/lib/modules/xxx/kernel/build No such file or directory, 安装kernel-devel包和kernel-headers包
命令:
# yum --disablerepo=’*’ -