[systemd-devel] Why does reboot invoke kexec command?

Baoquan He bhe at redhat.com
Thu Jan 28 02:03:18 UTC 2021


Hi,

>From systemd code, if kexec kernel is loaded, executing 'reboot' will
finally enter into reboot system call with KEXEC action. Wondering why
it has to invoke kexec command.

Asking this because in redhat CKI testing, one test case is 'kexec reboot'.
Now it's always failed and the relevant log is as below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[ 1669.796863] dracut Warning: Killing all remaining processes
dracut Warning: Killing all remaining processes
[ 1670.134541] XFS (dm-0): Unmounting Filesystem
[ 1670.145779] dracut Warning: Unmounted /oldroot.
[ 1670.168229] dracut: Disassembling device-mapper devices
kexec: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by kexec)
[ 1670.197024] dracut Warning: kexec failed!
dracut Warning: kexec failed!
Rebooting.
[ 1670.211839] kvm: exiting hardware virtualization
[ 1671.457978] reboot: Restarting system
[ 1671.461965] reboot: machine restart
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

What I have done is using 'kexec -l /boot/vmlinuz-xxx --initrd initramfs-xx.img --reuse-cmdline'
to load kexec kernel, then execute 'reboot' command to trigger the kexec
rebooting.

After investigation, the reason is that the OS is fedora33 for CKI
testing since in our beaker system, only fedora33 is available to
provison. For testing upstream kernel and upstream kexec-tools
functionality, QA upgrade kexec-tools/dracut/systemd to fedora34. So
after 'reboot' executed, it stops running processes, unmounting. Then it
will call kexec utility, and cause the failure of '/lib64/libc.so.6'
being not fount. 

Since systemctl can identify kexec action and will enter into reboot
system call, why kexec command need be executed or checked here?

Can anyone help have a look at this?

Really appreciate if any comment, suggestion, or thing I should try.

Thanks
Baoquan



More information about the systemd-devel mailing list