我在 22.04 上,刚刚进行了 dist-upgrade 来升级一些 helt-back 软件包,一切顺利。但是,我的启动现在似乎依赖于在我的以太网接口上获取 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
答案1
经过一番研究,似乎我的 initramfs-tools 有一个“aoe”挂钩脚本,可能是因为我正在积极使用 ATA-over-Ethernet,只是不用于我的根分区。此外,还有一个/usr/share/initramfs-tools/scripts/local-top/aoe
调用 bash 函数的脚本configure_networking
,而这个函数似乎是罪魁祸首。我不完全理解那个函数,但我认为它应该在根位于 NFS 分区时使用,而且由于我没有为我的 initramfs 配置任何与 NFS 相关的东西,它会疯狂地尝试启动所有网络接口,然后再尝试挂载根文件系统。我想应该提交错误报告...
编辑:以供将来参考,这里这是错误报告。