<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Does busybox's reboot work fine with recent systemd?<div><br></div><div>It stopped working for me and unfortunately u-a silently replaces</div><div><div>reboot -> ../bin/systemctl</div></div><div>symlink with</div><div><div>/sbin/reboot -> /bin/busybox.nosuid</div></div><div><br></div><div>In my images the busybox applets are unusable:</div><div><div> root@rpijama:~# reboot</div><div> root@rpijama:~# [ 2495.348099] systemd: 18 output lines suppressed due to ratelimiting</div><div> [ 2495.380408] systemd[1]: systemd 239 running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)</div><div> [ 2495.402735] systemd[1]: Detected architecture arm.</div><div> [ 2495.501328] systemd[1]: File /lib/systemd/system/systemd-udevd.service:36 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.</div><div> [ 2495.519048] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)</div><div> </div><div> root@rpijama:~# halt</div><div> [ 2521.200058] systemd[1]: Received SIGUSR1 from PID 1062 (halt).</div><div> [ 2521.206062] systemd[1]: Trying to reconnect to bus...</div></div><div><br></div><div>and it doesn't reboot or halt.</div><div><br></div><div>You can update systemd to use u-a for those commands as well, that way systemd version will win when both are enabled.</div><div><br></div><div>The same does apply for reboot, halt, poweroff:</div><div><br></div><div><div>symlinks provided by systemd:</div><div> lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 halt -> ../bin/systemctl</div><div> lrwxrwxrwx 1 bitbake bitbake 22 Mar 9 2018 init -> ../lib/systemd/systemd</div><div> lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 poweroff -> ../bin/systemctl</div><div> lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 reboot -> ../bin/systemctl</div><div> lrwxrwxrwx 1 bitbake bitbake 21 Mar 9 2018 resolvconf -> ../usr/bin/resolvectl</div><div> lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 runlevel -> ../bin/systemctl</div><div> lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 shutdown -> ../bin/systemctl</div><div> lrwxrwxrwx 1 bitbake bitbake 16 Mar 9 2018 telinit -> ../bin/systemctl</div><div> </div><div> are silently overwritten by u-a symlinks pointing to busybox:</div><div> root@rpijama:~# ls -lah /sbin/halt /sbin/init /sbin/poweroff /sbin/reboot /sbin/resolvconf /sbin/runlevel /sbin/shutdown /sbin/telinit</div><div> lrwxrwxrwx 1 root root 19 Mar 9 2018 /sbin/halt -> /bin/busybox.nosuid</div><div> lrwxrwxrwx 1 root root 22 Mar 9 2018 /sbin/init -> ../lib/systemd/systemd</div><div> lrwxrwxrwx 1 root root 19 Mar 9 2018 /sbin/poweroff -> /bin/busybox.nosuid</div><div> lrwxrwxrwx 1 root root 19 Mar 9 2018 /sbin/reboot -> /bin/busybox.nosuid</div><div> lrwxrwxrwx 1 root root 21 Mar 9 2018 /sbin/resolvconf -> ../usr/bin/resolvectl</div><div> lrwxrwxrwx 1 root root 16 Mar 9 2018 /sbin/runlevel -> ../bin/systemctl</div><div> lrwxrwxrwx 1 root root 16 Mar 9 2018 /sbin/shutdown -> ../bin/systemctl</div></div><div><br></div><div>Cheers,</div><div><br></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 11, 2018 at 10:41 AM Anuj Mittal <<a href="mailto:anuj.mittal@intel.com">anuj.mittal@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">reboot is needed for initramfs where no init manager is set. This<br>
partially reverts:<br>
<br>
commit b6fbb3f3d4d6367b0fd7921078f67057551c7ede<br>
Author: Chen Qi <<a href="mailto:Qi.Chen@windriver.com" target="_blank">Qi.Chen@windriver.com</a>><br>
Date: Mon Jul 30 17:41:57 2018 +0800<br>
<br>
busybox: move init related configs to init.cfg<br>
<br>
Move init related configs to init.cfg.<br>
<br>
These config items do not make much sense unless busybox is selected<br>
as the init manager. They should belong to init.cfg.<br>
<br>
We would need to set up ALTERNATIVES for reboot in this case.<br>
<br>
Signed-off-by: Anuj Mittal <<a href="mailto:anuj.mittal@intel.com" target="_blank">anuj.mittal@intel.com</a>><br>
---<br>
meta/recipes-core/busybox/busybox/defconfig | 2 +-<br>
meta/recipes-core/busybox/busybox/init.cfg | 1 -<br>
2 files changed, 1 insertion(+), 2 deletions(-)<br>
<br>
diff --git a/meta/recipes-core/busybox/busybox/defconfig b/meta/recipes-core/busybox/busybox/defconfig<br>
index f081f281cc..32213c0675 100644<br>
--- a/meta/recipes-core/busybox/busybox/defconfig<br>
+++ b/meta/recipes-core/busybox/busybox/defconfig<br>
@@ -480,7 +480,7 @@ CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR=y<br>
# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set<br>
# CONFIG_HALT is not set<br>
# CONFIG_POWEROFF is not set<br>
-# CONFIG_REBOOT is not set<br>
+CONFIG_REBOOT=y<br>
# CONFIG_FEATURE_CALL_TELINIT is not set<br>
# CONFIG_TELINIT_PATH is not set<br>
# CONFIG_INIT is not set<br>
diff --git a/meta/recipes-core/busybox/busybox/init.cfg b/meta/recipes-core/busybox/busybox/init.cfg<br>
index 3c1fdd42b6..3b839c515c 100644<br>
--- a/meta/recipes-core/busybox/busybox/init.cfg<br>
+++ b/meta/recipes-core/busybox/busybox/init.cfg<br>
@@ -2,7 +2,6 @@ CONFIG_INIT=y<br>
CONFIG_FEATURE_USE_INITTAB=y<br>
CONFIG_HALT=y<br>
CONFIG_POWEROFF=y<br>
-CONFIG_REBOOT=y<br>
CONFIG_FEATURE_KILL_DELAY=0<br>
CONFIG_TELINIT_PATH=""<br>
CONFIG_INIT_TERMINAL_TYPE=""<br>
-- <br>
2.17.1<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>