systemd[1]:删除作业 raspi-config.service/start 以打破以 basic.target/start 开始的订购周期

systemd[1]:删除作业 raspi-config.service/start 以打破以 basic.target/start 开始的订购周期

我在运行 Raspbian 的 Raspberry Pi 的启动日志中看到这些错误。您认为这些错误表明了什么以及应该采取什么措施?

systemd[1]: Job raspi-config.service/start deleted to break ordering cycle starting with basic.target/start
systemd[1]: Job kbd.service/start deleted to break ordering cycle starting with basic.target/start
systemd[1]: Job console-setup.service/start deleted to break ordering cycle starting with basic.target/start

我最近创建了一个新用户并删除了默认用户'pi',我不确定这些错误是否源于此。

这里是log部分,注意上面的错误穿插:

Nov 26 22:11:58 raspberrypi systemd[1]: Found ordering cycle on basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on sysinit.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on raspi-config.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on remote-fs.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on mnt-ds415.mount/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on network.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on dhcpcd.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Breaking ordering cycle by deleting job raspi-config.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Job raspi-config.service/start deleted to break ordering cycle starting with basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found ordering cycle on basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on sysinit.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on kbd.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on remote-fs.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on mnt-ds415.mount/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on network.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on dhcpcd.service/start
Nov 26 22:11:58 raspberrypi kernel: usb 1-1.2: new full-speed USB device number 4 using dwc_otg
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Breaking ordering cycle by deleting job kbd.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Job kbd.service/start deleted to break ordering cycle starting with basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found ordering cycle on basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on sysinit.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on console-setup.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on remote-fs.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on mnt-ds415.mount/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on network.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on dhcpcd.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Found dependency on basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Breaking ordering cycle by deleting job console-setup.service/start
Nov 26 22:11:58 raspberrypi systemd[1]: Job console-setup.service/start deleted to break ordering cycle starting with basic.target/start
Nov 26 22:11:58 raspberrypi systemd[1]: Expecting device dev-ttyAMA0.device...
Nov 26 22:11:58 raspberrypi systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
Nov 26 22:11:58 raspberrypi systemd[1]: Started Forward Password Requests to Wall Directory Watch.
Nov 26 22:11:58 raspberrypi systemd[1]: Starting Remote File Systems (Pre).

答案1

这与 Debian Jessie 未能完美地完成 Debian 到 systemd 的迁移有关。由于 Raspbian 基于 Debian,因此也存在同样的问题。问题在于,并非 rcS.d 中的所有作业都有相应的 systemd 单元,并且后续运行级别中的 init 脚本仍然期望 rcS.d 中的所有内容在它们开始运行时都已执行。为了确保这个假设有效,Debian 中的 systemd 软件包添加了一个“sysinit”单元,它依赖于 rcS.d 中的所有内容,并且后续运行级别中的所有内容都依赖于它(直接或间接)。

不幸的是,这个解决方法保留了 systemd 不知道的概念,因此这可能会导致循环依赖,正如您在此处看到的那样。下一个 Debian 版本的一个发布目标是消除该解决方法及其引起的问题。

对于你个人来说,你无能为力。如果您愿意,您可以调整依赖项,但除非它导致服务无法正常启动的问题,否则我不会这样做。如果它确实导致了此类问题,那么提交错误可能比自己修复它更好,因为您不是唯一遇到这些问题的人......

相关内容