开始登录后的“systemd”消息

开始登录后的“systemd”消息

启动过程systemd开始后agetty,但 1--2 秒后会出现其他消息:

照片

如何避免这种情况?

我使用 Arch Linux,systemd 194。

$ grep '^[^#]' /etc/systemd/system/getty.target.wants/[email protected]
[Unit]
Description=Getty on %I
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
After=rc-local.service
Before=getty.target
IgnoreOnIsolate=yes
ConditionPathExists=/dev/tty0

[Service]
Environment=TERM=linux
ExecStart=-/sbin/agetty --noclear %I 38400
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
KillSignal=SIGHUP

[Install]
Alias=getty.target.wants/[email protected]

答案1

这是一个错误: https://bugs.freedesktop.org/show_bug.cgi?id=54247

目前唯一的解决方法是使用quiet内核行中的参数。

答案2

我有同样的问题。问题是 netcfg 需要很长时间(至少在我的情况下),并且 getty 不会等待 netcfg (或更一般地说,network.target)完成。因此,解决方案是让 getty 等待。

为此,最简单的方法是对[电子邮件受保护]单元文件。幸运的是,systemd 允许我们在不直接覆盖任何文件的情况下执行此操作。只需创建文件夹并在其中添加文件(实际上,任何文件名都可以,只要它以 .conf 结尾)。/etc/systemd/system/[email protected]/custom.conf

在 custom.conf 中你必须写:

[Unit]
After=network.target

这应该可以解决问题

相关内容