最近,我的一个无头 ubuntu 20.04 系统在登录时开始显示“需要重启系统”。因此,我执行了 apt upgrade 和 apt update(而不是 dist update)。重启后我没有恢复 ssh 访问权限。将显示器和键盘连接到它并重新重启后,我发现 eth0 不再出现。没问题:我刚刚发出
ifconfig et0 up
它确实返回了。但它仍然没有获取 IP 地址。
以下是网络配置文件(/etc/netplan/01-network-manager-all.yaml)的内容:
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
dhcp4: no
addresses:
- 192.168.1.6/24
gateway4: 192.168.1.254
nameservers:
addresses: [192.168.1.2]
仔细检查 dmesg 后,我发现除了这个之外,没有什么错误:
[ 0.549347] ACPI: button: Power Button [PWRB]
[ 0.549367] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[ 0.549388] ACPI: button: Power Button [PWRF]
[ 0.549500] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549509] No Local Variables are initialized for Method [_CPC]
[ 0.549510] No Arguments are initialized for method [_CPC]
[ 0.549511] ACPI Error: Aborting method \_SB.PR01._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549545] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549550] No Local Variables are initialized for Method [_CPC]
[ 0.549552] No Arguments are initialized for method [_CPC]
[ 0.549553] ACPI Error: Aborting method \_SB.PR02._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549586] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549593] No Local Variables are initialized for Method [_CPC]
[ 0.549594] No Arguments are initialized for method [_CPC]
[ 0.549596] ACPI Error: Aborting method \_SB.PR03._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549627] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549632] No Local Variables are initialized for Method [_CPC]
[ 0.549633] No Arguments are initialized for method [_CPC]
[ 0.549634] ACPI Error: Aborting method \_SB.PR04._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549665] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549670] No Local Variables are initialized for Method [_CPC]
[ 0.549671] No Arguments are initialized for method [_CPC]
[ 0.549673] ACPI Error: Aborting method \_SB.PR05._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549704] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549709] No Local Variables are initialized for Method [_CPC]
[ 0.549710] No Arguments are initialized for method [_CPC]
[ 0.549711] ACPI Error: Aborting method \_SB.PR06._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549742] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549748] No Local Variables are initialized for Method [_CPC]
[ 0.549749] No Arguments are initialized for method [_CPC]
[ 0.549750] ACPI Error: Aborting method \_SB.PR07._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549782] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549787] No Local Variables are initialized for Method [_CPC]
[ 0.549788] No Arguments are initialized for method [_CPC]
[ 0.549789] ACPI Error: Aborting method \_SB.PR08._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549823] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549829] No Local Variables are initialized for Method [_CPC]
[ 0.549830] No Arguments are initialized for method [_CPC]
[ 0.549831] ACPI Error: Aborting method \_SB.PR09._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549862] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549868] No Local Variables are initialized for Method [_CPC]
[ 0.549869] No Arguments are initialized for method [_CPC]
[ 0.549870] ACPI Error: Aborting method \_SB.PR10._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549900] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PR00._CPC], AE_NOT_FOUND (20210730/psargs-330)
[ 0.549905] No Local Variables are initialized for Method [_CPC]
[ 0.549906] No Arguments are initialized for method [_CPC]
[ 0.549907] ACPI Error: Aborting method \_SB.PR11._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
我无法判断上述情况是新问题还是旧问题。我对此类错误的大部分研究都揭示了让错误消失而不是修复错误的方法。而且,我不知道这是否与这个问题有关。
更换以太网电缆没有帮助。
dmesg|egrep 'net|eth' 显示以下内容:
[ 0.265462] audit: initializing netlink subsys (disabled)
[ 0.549509] No Local Variables are initialized for Method [_CPC]
[ 0.549510] No Arguments are initialized for method [_CPC]
[ 0.549511] ACPI Error: Aborting method \_SB.PR01._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549550] No Local Variables are initialized for Method [_CPC]
[ 0.549552] No Arguments are initialized for method [_CPC]
[ 0.549553] ACPI Error: Aborting method \_SB.PR02._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549593] No Local Variables are initialized for Method [_CPC]
[ 0.549594] No Arguments are initialized for method [_CPC]
[ 0.549596] ACPI Error: Aborting method \_SB.PR03._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549632] No Local Variables are initialized for Method [_CPC]
[ 0.549633] No Arguments are initialized for method [_CPC]
[ 0.549634] ACPI Error: Aborting method \_SB.PR04._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549670] No Local Variables are initialized for Method [_CPC]
[ 0.549671] No Arguments are initialized for method [_CPC]
[ 0.549673] ACPI Error: Aborting method \_SB.PR05._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549709] No Local Variables are initialized for Method [_CPC]
[ 0.549710] No Arguments are initialized for method [_CPC]
[ 0.549711] ACPI Error: Aborting method \_SB.PR06._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549748] No Local Variables are initialized for Method [_CPC]
[ 0.549749] No Arguments are initialized for method [_CPC]
[ 0.549750] ACPI Error: Aborting method \_SB.PR07._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549787] No Local Variables are initialized for Method [_CPC]
[ 0.549788] No Arguments are initialized for method [_CPC]
[ 0.549789] ACPI Error: Aborting method \_SB.PR08._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549829] No Local Variables are initialized for Method [_CPC]
[ 0.549830] No Arguments are initialized for method [_CPC]
[ 0.549831] ACPI Error: Aborting method \_SB.PR09._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549868] No Local Variables are initialized for Method [_CPC]
[ 0.549869] No Arguments are initialized for method [_CPC]
[ 0.549870] ACPI Error: Aborting method \_SB.PR10._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.549905] No Local Variables are initialized for Method [_CPC]
[ 0.549906] No Arguments are initialized for method [_CPC]
[ 0.549907] ACPI Error: Aborting method \_SB.PR11._CPC due to previous error (AE_NOT_FOUND) (20210730/psparse-529)
[ 0.582001] drop_monitor: Initializing network drop monitor service
[ 1.572239] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) b4:2e:99:a2:58:77
[ 1.572252] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection
[ 1.572342] e1000e 0000:00:1f.6 eth0: MAC: 13, PHY: 12, PBA No: FFFFFF-0FF
[ 12.338807] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[ 151.263109] e1000e 0000:00:1f.6 eth0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 151.263213] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1037.905604] e1000e 0000:00:1f.6 eth0: NIC Link is Down
[ 1050.728466] e1000e 0000:00:1f.6 eth0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
[ 1050.728566] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
除了那些消息和 eth0 不会出现之外,每次重新启动似乎都很好。即使在重新启动并执行“ifconfig eth0 up”后,局域网也无法获取 IP 地址。
由于该服务器是众所周知的并在整个网络提供必要的服务,我暂时将 192.168.1.6 地址作为 wifi 的辅助地址,但显然让最可靠的网络连接不起作用并不是理想的选择。
ifconfig eth0 显示以下内容:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 2600:1700:5950:3240:b62e:99ff:fea2:5877 prefixlen 64 scopeid 0x0<global>
inet6 fe80::b62e:99ff:fea2:5877 prefixlen 64 scopeid 0x20<link>
ether b4:2e:99:a2:58:77 txqueuelen 1000 (Ethernet)
RX packets 114055 bytes 10247594 (10.2 MB)
RX errors 0 dropped 12707 overruns 0 frame 0
TX packets 509 bytes 69493 (69.4 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0x51200000-51220000
编辑:执行以下命令的系统日志结果
ifconfig eth0 down && sleep 60 && ifconfig eth0 up && tail /var/log/syslog
Oct 29 14:48:56 velmicro kernel: [ 9784.175020] usb usb2-port10: Cannot enable. Maybe the USB cable is bad?
Oct 29 14:48:59 velmicro avahi-daemon[943]: Interface eth0.IPv6 no longer relevant for mDNS.
Oct 29 14:48:59 velmicro avahi-daemon[943]: Leaving mDNS multicast group on interface eth0.IPv6 with address 2600:1700:5950:3240:b62e:99ff:fea2:5877.
Oct 29 14:48:59 velmicro kernel: [ 9787.610271] e1000e 0000:00:1f.6 eth0: NIC Link is Down
Oct 29 14:48:59 velmicro avahi-daemon[943]: Withdrawing address record for 2600:1700:5950:3240:b62e:99ff:fea2:5877 on eth0.
Oct 29 14:50:02 velmicro kernel: [ 9850.470210] e1000e 0000:00:1f.6 eth0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: Rx/Tx
Oct 29 14:50:02 velmicro kernel: [ 9850.470312] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Oct 29 14:50:02 velmicro NetworkManager[947]: <info> [1667069402.5725] device (eth0): carrier: link connected
Oct 29 14:50:04 velmicro avahi-daemon[943]: Joining mDNS multicast group on interface eth0.IPv6 with address fe80::b62e:99ff:fea2:5877.
Oct 29 14:50:04 velmicro avahi-daemon[943]: New relevant interface eth0.IPv6 for mDNS.
Oct 29 14:50:04 velmicro avahi-daemon[943]: Registering new address record for fe80::b62e:99ff:fea2:5877 on eth0.*.
Oct 29 14:50:06 velmicro avahi-daemon[943]: Leaving mDNS multicast group on interface eth0.IPv6 with address fe80::b62e:99ff:fea2:5877.
Oct 29 14:50:06 velmicro avahi-daemon[943]: Joining mDNS multicast group on interface eth0.IPv6 with address 2600:1700:5950:3240:b62e:99ff:fea2:5877.
Oct 29 14:50:06 velmicro avahi-daemon[943]: Registering new address record for 2600:1700:5950:3240:b62e:99ff:fea2:5877 on eth0.*.
Oct 29 14:50:06 velmicro avahi-daemon[943]: Withdrawing address record for fe80::b62e:99ff:fea2:5877 on eth0.
编辑:mcli 的输出不包括 eth0:
# nmcli con
NAME UUID TYPE DEVICE
ls2021.lovelady.com a4fa8d23-a06d-4955-bfd9-5d7de76584c2 wifi wlan0
再次,一切都很好,直到“apt upgrade”
我可以尝试什么来解决这个问题?