在 Ubuntu 下重新安裝網卡驅動程式

我手上有一台機器它的網路卡一直都不太穩,可能因為它是 10G 介面,所以我就到 Intel 官網重新下載驅動程式並且重新安裝,這邊紀錄安裝的步驟。

第一步

確定網卡驅動型號可以使用 lspci | grep Ethernet 來確定網卡型號像是我的型號是 Intel Corporation Ethernet Controller 10G X550T (rev 01) 就可以到 Intel 官網尋找驅動程式

第二步

到 Intel 官網下載驅動程式,像我的驅動程式就可以在 Intel® 乙太網路聚合式網路介面卡 X550-T1 頁面找到

然後選擇左邊的驅動程式與軟體,在下面可以找到 Linux* 下適用于 PCIe* Intel 10 Gigabit 乙太網路連線的 Intel® 網路介面卡驅動程式 ,想辦法把他下載到你的主機上

第三步

安裝驅動程式方法

tar -xvf ixgbevf-4.17.5.tar.gz
cd ixgbevf-4.17.5/src/
sudo make install
sudo reboot

以下為指令詳細紀錄

clarence@localhost:~$ lspci | grep Ethernet
01:00.0 Ethernet controller: Intel Corporation Ethernet Controller 10G X550T (rev 01)
01:00.1 Ethernet controller: Intel Corporation Ethernet Controller 10G X550T (rev 01)

clarence@localhost:~$ wget https://downloadmirror.intel.com/762486/ixgbevf-4.17.5.tar.gz
--2023-03-06 02:29:17--  https://downloadmirror.intel.com/762486/ixgbevf-4.17.5.tar.gz
Resolving downloadmirror.intel.com (downloadmirror.intel.com)... 13.35.7.109, 13.35.7.2, 13.35.7.38, ...
Connecting to downloadmirror.intel.com (downloadmirror.intel.com)|13.35.7.109|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 234157 (229K) [application/gzip]
Saving to: ‘ixgbevf-4.17.5.tar.gz’

ixgbevf-4.17.5.tar.gz     100%[==================================>] 228.67K   740KB/s    in 0.3s

2023-03-06 02:29:18 (740 KB/s) - ‘ixgbevf-4.17.5.tar.gz’ saved [234157/234157]

clarence@localhost:~$ tar -xvf ixgbevf-4.17.5.tar.gz
ixgbevf-4.17.5/
ixgbevf-4.17.5/src/
ixgbevf-4.17.5/src/ixgbevf_osdep2.h
ixgbevf-4.17.5/src/ixgbevf_main.c
ixgbevf-4.17.5/src/ixgbevf_ethtool.c
ixgbevf-4.17.5/src/ixgbevf_osdep.h
ixgbevf-4.17.5/src/ixgbevf.h
ixgbevf-4.17.5/src/ixgbe_type.h
ixgbevf-4.17.5/src/ixgbe_common.h
ixgbevf-4.17.5/src/ixgbe_vf.h
ixgbevf-4.17.5/src/ixgbe_mbx.h
ixgbevf-4.17.5/src/ixgbe_vf.c
ixgbevf-4.17.5/src/ixgbe_mbx.c
ixgbevf-4.17.5/src/ixgbe_hv_vf.h
ixgbevf-4.17.5/src/ixgbe_hv_vf.c
ixgbevf-4.17.5/src/kcompat_gcc.h
ixgbevf-4.17.5/src/kcompat.h
ixgbevf-4.17.5/src/kcompat_impl.h
ixgbevf-4.17.5/src/kcompat_defs.h
ixgbevf-4.17.5/src/kcompat_sles_defs.h
ixgbevf-4.17.5/src/kcompat_rhel_defs.h
ixgbevf-4.17.5/src/kcompat_oracle_defs.h
ixgbevf-4.17.5/src/kcompat_ubuntu_defs.h
ixgbevf-4.17.5/src/kcompat_std_defs.h
ixgbevf-4.17.5/src/kcompat.c
ixgbevf-4.17.5/src/kcompat_ethtool.c
ixgbevf-4.17.5/src/kcompat_overflow.h
ixgbevf-4.17.5/src/Makefile
ixgbevf-4.17.5/src/common.mk
ixgbevf-4.17.5/src/Module.supported
ixgbevf-4.17.5/scripts/
ixgbevf-4.17.5/scripts/set_irq_affinity
ixgbevf-4.17.5/pci.updates
ixgbevf-4.17.5/COPYING
ixgbevf-4.17.5/README
ixgbevf-4.17.5/ixgbevf.7
ixgbevf-4.17.5/ixgbevf.spec
ixgbevf-4.17.5/SUMS

clarence@localhost:~$ cd ixgbevf-4.17.5/src/

clarence@localhost:~/ixgbevf-4.17.5/src$ sudo make install
[sudo] password for clarence:
*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but
*** the signing key cannot be found. Module signing has been
*** disabled for this build.
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-144-generic'
  CC [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbevf_main.o
  CC [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbevf_ethtool.o
  CC [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbe_vf.o
  CC [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbe_mbx.o
  CC [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbe_hv_vf.o
  CC [M]  /home/clarence/ixgbevf-4.17.5/src/kcompat.o
  LD [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbevf.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbevf.mod.o
  LD [M]  /home/clarence/ixgbevf-4.17.5/src/ixgbevf.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-144-generic'
Installing modules...
*** The target kernel has CONFIG_MODULE_SIG_ALL enabled, but
*** the signing key cannot be found. Module signing has been
*** disabled for this build.
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-144-generic'
  INSTALL /home/clarence/ixgbevf-4.17.5/src/ixgbevf.ko
  DEPMOD  5.4.0-144-generic
Warning: modules_install: missing 'System.map' file. Skipping depmod.
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-144-generic'
Copying manpages...
Running depmod...
/sbin/depmod -e -F /boot/System.map-5.4.0-144-generic  -a 5.4.0-144-generic
Updating initramfs...
update-initramfs: Generating /boot/initrd.img-5.4.0-144-generic

參考資料