找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 768|回复: 0

[Debian] PVE安装rtl8156B usb nic 驱动

[复制链接]
近日因夏季高温,老的usb网卡扛不住出现频繁掉先情况。
去系统日志里一查,发现:网卡多次失联有重新恢复。遂入手一张rtl8156b的usb网卡替代。
上机以后被系统识别,但用ethtool查看详细信息,发现:
  1. Supported link modes: Not supported
复制代码
看来linux内核带的默认驱动还是不行(cdc_ncm),还得手动安装realtek的官方驱动。
首先尝试debian里的realtek软件包,结果跟pve提供的驱动软件包冲突,还好有个hook阻止了我这么做。。。
  1. $ apt install firmware-realtek

  2. W: (pve-apt-hook) !! WARNING !!
  3. W: (pve-apt-hook) You are attempting to remove the meta-package 'proxmox-ve'!
  4. W: (pve-apt-hook)
  5. W: (pve-apt-hook) If you really want to permanently remove 'proxmox-ve' from your system, run the following command
  6. W: (pve-apt-hook)       touch '/please-remove-proxmox-ve'
  7. W: (pve-apt-hook) run apt purge proxmox-ve to remove the meta-package
  8. W: (pve-apt-hook) and repeat your apt invocation.
  9. W: (pve-apt-hook)
  10. W: (pve-apt-hook) If you are unsure why 'proxmox-ve' would be removed, please verify
  11. W: (pve-apt-hook)       - your APT repository settings
  12. W: (pve-apt-hook)       - that you are using 'apt full-upgrade' to upgrade your system
复制代码
然后去realtek下载驱动源码,在本机编译,下载地址
方便网络不好的朋友此贴附件里已经下载好了
  1. https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software
复制代码
安装编译工具和依赖库 build-essential libelf-dev dkms

  1. $ apt install build-essential libelf-dev dkms
复制代码
安装当前内核的头文件
  1. $ uanme -a
  2. # Linux klee 6.2.16-3-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.16-3 (2023-06-17T05:58Z) x86_64 GNU/Linux

  3. $ apt search 6.2.16-3-pve
  4. #pve-headers-6.2.16-3-pve/stable,now 6.2.16-3 amd64 [installed]

  5. $ apt install pve-headers-6.2.16-3-pve
复制代码
将驱动上传,切换工作目录,make && make install
  1. $ cd /tmp/r8152-2.17.1/
  2. $ ls
  3. $ make && make install
  4. $ depmod -a
  5. $ update-initramfs -u
  6. $ reboot
复制代码
再次查看一下使用的驱动 ethtool -i [INTERFACE]
  1. $ ethtool -i [INTERFACE]
  2. driver: r8152
  3. version: v2.17.1 (2023/06/13)

  4. $ ethtool [INTERFACE]
  5.         Supported ports: [ MII ]
  6.         Supported link modes:   10baseT/Half 10baseT/Full
  7.                                 100baseT/Half 100baseT/Full
  8.                                 1000baseT/Full
  9.                                 2500baseT/Full
  10.         Supported pause frame use: No
  11.         Supports auto-negotiation: Yes
  12.         Supported FEC modes: Not reported
  13.         Advertised link modes:  10baseT/Half 10baseT/Full
  14.                                 100baseT/Half 100baseT/Full
  15.                                 1000baseT/Full
  16.                                 2500baseT/Full
  17.         Advertised pause frame use: No
  18.         Advertised auto-negotiation: Yes
  19.         Advertised FEC modes: Not reported
  20.         Link partner advertised link modes:  10baseT/Half 10baseT/Full
  21.                                              100baseT/Half 100baseT/Full
  22.                                              1000baseT/Half 1000baseT/Full
  23.         Link partner advertised pause frame use: No
  24.         Link partner advertised auto-negotiation: Yes
  25.         Link partner advertised FEC modes: Not reported
  26.         Speed: 1000Mb/s
  27.         Duplex: Full
  28.         Auto-negotiation: on
  29.         Port: MII
  30.         PHYAD: 32
  31.         Transceiver: internal
  32.         Supports Wake-on: pumbg
  33.         Wake-on: g
  34.         Current message level: 0x00007fff (32767)
  35.                                drv probe link timer ifdown ifup rx_err tx_err tx_queued intr tx_done rx_status pktdata hw wol
  36.         Link detected: yes

复制代码
大功告成。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-5-16 06:59

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表