我正在运行 ubuntu 18.04.2 LTS。在最新更新后,我没有互联网。我甚至在网络管理器中没有以太网选项。Ifconfig -a 只给我 lo 接口。在更新和重启计算机之间,我将内核从 linux-image-4.15.0-43-generic 更改为 linux-image-4.15.0-45-generic。
lspci -v
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 02)
Subsystem: Gigabyte Technology Co., Ltd Onboard Ethernet
Flags: bus master, fast devsel, latency 0, IRQ 10, NUMA node 0
I/O ports at de00 [size=256]
Memory at fdbff000 (64-bit, prefetchable) [size=4K]
Memory at fdbe0000 (64-bit, prefetchable) [size=64K]
[virtual] Expansion ROM at fde00000 [disabled] [size=64K]
Capabilities: [40] Power Management version 3
Capabilities: [50] MSI: Enable- Count=1/2 Maskable- 64bit+
Capabilities: [70] Express Endpoint, MSI 01
Capabilities: [b0] MSI-X: Enable- Count=2 Masked-
Capabilities: [d0] Vital Product Data
Capabilities: [100] Advanced Error Reporting
Capabilities: [140] Virtual Channel
Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78
lshw -C network
*-network UNCLAIMED
description: Ethernet controller
product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
vendor: Realtek Semiconductor Co., Ltd.
physical id: 0
bus info: pci@0000:02:00.0
version: 02
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress msix vpd bus_master cap_list
configuration: latency=0
resources: ioport:de00(size=256) memory:fdbff000-fdbfffff memory:fdbe0000-fdbeffff memory:fde00000-fde0ffff
答案1
同样的问题,昨晚又出现了。上次我删除了新内核,然后使用旧内核重新启动,问题就解决了,但这次我无能为力。通过互联网搜索,我被告知“删除 r8168-dkms”,但我从未安装过 r8168-dkms。那么反过来,安装 r8168-dkms 怎么样?
由于这块网卡是主板上唯一的一块网卡,所以系统中没有网络访问。使用 yumi 和 ubuntu 20.04 桌面 iso 映像制作了一个 usb live cd 来启动,幸运的是其中的网络可以使用。然后通过以下命令在 live 系统中下载 r8168-dkms 包:
sudo -i
# mount the real os, and get into it
mount /dev/sdX /mnt
chroot /mnt
# apt download package and dependencies into /var/cache, without installing them
apt install --download-only r8168-dkms
reboot
重新启动回到真正的 ubuntu 系统,运行以下命令:
sudo -i
# install the cached package
apt install r8168-dkms
reboot
完成,希望这可以帮助别人