我在 22.04 上,刚刚做了一个 dist-upgrade 来升级一些后备包,一切顺利。然而,我的启动现在似乎依赖于在我的以太网接口上获取 DHCP 租用。(旁注:我还有一个 wifi 接口,它可以很好地获得租约,但这不是重点。如果我没有网络,我的启动永远不会被阻止,除非我的根文件系统位于网络挂载上,它不是)。
这是我的 dmesg 的摘录和评论:
[...]
[ 1.767795] usb 1-10: New USB device found, idVendor=8087, idProduct=0033, bcdDevice= 0.00
[ 1.768998] usb 1-10: New USB device strings: Mfr=0, Product=0, SerialNumber=0
((COMMENT: onscreen I see the following here, but it doesn't show up in dmesg:
Begin: Loading essential drivers... done
Begin: Running /scripts/init/premount... done
Begin: Mounting root filesystem... Begin: running /scripts/local-top... Internet Systems Consortium DHCP Client 4.4.1
... lots of messages from DHCP failing to get a lease on my ethernet interface until I plug-in a cable...))
[ 27.667412] e1000e 0000:00:1f.6 enp0s31f6: NIC Link is Up 100 Mbps Full Duplex, Flow Control: Rx/Tx
[ 30.830852] aoe: AoE v85 initialised.
[ 30.897545] EXT4-fs (nvme0n1p4): mounted filesystem 0a928e5f-d8c1-4b2a-9d12-b6d814efcf42 ro with ordered data mode. Quota mode: none.
[ 31.021829] systemd[1]: Inserted module 'autofs4'
[ 31.133440] systemd[1]: systemd 249.11-0ubuntu3.11 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT +GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDISK +PCRE2 -PWQUALITY -P11KIT -QRENCODE +BZIP2 +LZ4 +XZ +ZLIB +ZSTD -XKBCOMMON +UTMP +SYSVINIT default-hierarchy=unified)
[ 31.134679] systemd[1]: Detected architecture x86-64.
[ 31.137303] systemd[1]: Hostname set to <Laubhaufen>.
[ 31.181109] block nvme0n1: the capability attribute has been deprecated.
[ 31.248674] systemd[1]: /lib/systemd/system/clamav-freshclam.service:11: Standard output type syslog is obsolete, automatically updating to journal. Please update your unit file, and consider removing the setting altogether.
[ 31.267985] systemd[1]: Queued start job for default target Graphical Interface.
[...]
查看屏幕输出,似乎 initramfs 确实认为我的根分区可能位于网络上,因为它在“开始:安装根文件系统...”之后没有说“完成”。这是怎么回事?
编辑:我的/proc/cmdline
包含BOOT_IMAGE=/boot/vmlinuz-6.5.0-28-generic root=UUID=0a928e5f-d8c1-4b2a-9d12-b6d814efcf42 ro apparmor=0
研究了一下,我的 initramfs-tools 似乎有一个“aoe”钩子脚本,可能是因为我正在积极使用 ATA-over-Ethernet,但不适用于我的根分区。此外,还有一个
/usr/share/initramfs-tools/scripts/local-top/aoe
调用 bash 函数的脚本configure_networking
,而该函数似乎是罪魁祸首。我不完全理解这个函数,但我认为它应该在 root 位于 NFS 分区上时使用,并且由于我没有为 initramfs 配置任何与 NFS 相关的东西,它会疯狂地尝试获取所有网络在尝试挂载 root-fs 之前,接口已启动。我想错误报告是有序的......编辑:为了将来的参考,这里是错误报告。