ifupdown-wait-online.service(即使已禁用)/ xfce 需要 5 分钟才能加载

ifupdown-wait-online.service(即使已禁用)/ xfce 需要 5 分钟才能加载

我现在正在使用 Ubuntu 22.04,ifupdown-wait-online.service 需要 5 分钟才能加载,xfce 也是如此。我给出了:

# systemd-analyze blame

结果如下;正如我所想的那样:

https://pastebin.ubuntu.com/p/XqMKnqNBjZ

我在这里找到了该问题的可能解决方案:

https://bbs.archlinux.org/viewtopic.php?id=256366

这是我所做的:

https://pastebin.ubuntu.com/p/yGRSB7WDXZ/

但不,它不起作用。 ifupdown-wait-online.service 仍然需要 5 分钟才能运行:

root@chromarietto:~# systemd-analyze blame

5min 1.101s ifupdown-wait-online.service

我尝试了另一种方法,但效果不佳:

root@chromarietto:~# systemctl disable systemd-networkd-wait-online.service
    
Removed /etc/systemd/system/network-online.target.wants/systemd-networkd-wait-online.service.


root@chromarietto:~# systemctl stop systemd-networkd-wait-online.service
    
root@chromarietto:~# reboot

Connection to 192.168.1.6 closed by remote host. Connection to 192.168.1.6 closed.


root@Z390-AORUS-PRO-DEST:/home/ziomario# ssh -Y [email protected]
    
[email protected]'s password:

"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8)." Warning: No xauth data; using fake authentication data for X11 forwarding.

"System is booting up. Unprivileged users are not permitted to log in yet. Please come back later. For technical details, see pam_nologin(8)."

Welcome to Ubuntu 22.04.3 LTS (GNU/Linux 5.4.244 armv7l)

    Documentation: https://help.ubuntu.com

    Management: https://landscape.canonical.com

    Support: https://ubuntu.com/advantage

Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates. See https://ubuntu.com/esm or run: sudo pro status

Last login: Tue Sep 12 12:14:55 2023 from 192.168.1.2


root@chromarietto:~# systemd-analyze blame

Bootup is not yet finished (org.freedesktop.systemd1.Manager.FinishTimestampMonotonic=0).

Please try again later.

Hint: Use 'systemctl list-jobs' to see active jobs


root@chromarietto:~# systemctl list-jobs

No jobs running.

更新 :

一位 Ubuntu 开发人员解释说:

ifupdown 很久以前就在 ubuntu 中被弃用,取而代之的是 systemd-networkd/netplan,据我所知甚至 debian 也放弃了它,因此它与 systemd 的集成可能会有很大欠缺...

好的,但我还是不知道如何解决这个问题。他说得有点含糊。

答案1

解决方案是禁用ifupdown-wait-online.service(不是systemd-networkd-wait-online.service

sudo systemctl disable ifupdown-wait-online.service

相关内容