[Bug 1862300] Re: "systemctl kexec" reboots
Alex Badea
vamposdecampos at gmail.com
Fri Feb 7 05:29:54 UTC 2020
Turns out, systemd's shutdown implementation fork/execs the kexec binary
from kexec-tools; this is missing from the /run/initramfs finalrd.
systemd then falls through to reboot:
https://github.com/systemd/systemd/blob/a859abf062cef1511e4879c4ee39c6036ebeaec8/src/shutdown/shutdown.c#L557
One way to fix it might be for finalrd to "copy_exec /sbin/kexec" if it
exists. Alternatively, the kexec-tools package might ship a finalrd
hook instead.
** Also affects: finalrd
Importance: Undecided
Status: New
** Project changed: finalrd => kexec-tools (Ubuntu)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to finalrd in Ubuntu.
https://bugs.launchpad.net/bugs/1862300
Title:
"systemctl kexec" reboots
Status in finalrd package in Ubuntu:
New
Status in kexec-tools package in Ubuntu:
New
Bug description:
After the introduction of finalrd, "systemctl kexec" (with a kernel
preloaded by "kexec -l ...") no longer kexec()s -- it reboots instead.
Can be reproduced for example using a livecd (say, xubuntu-18.04
-desktop-amd64.iso):
sudo -i
apt-get update
apt-get install kexec-tools finalrd
systemctl start finalrd # optional
kexec -l /cdrom/casper/vmlinuz
systemctl kexec
Expected results: the system kexec's into the kernel and panics (due
to lack of /init, since we haven't given it an initrd).
Actual results: the system reboots (e.g. the livecd's bootloader menu
runs).
If we don't install "finalrd" above, kexec works normally.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/finalrd/+bug/1862300/+subscriptions
More information about the foundations-bugs
mailing list