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

Lennart Poettering lennart at poettering.net
Thu Jan 28 14:24:33 UTC 2021


On Do, 28.01.21 10:03, Baoquan He (bhe at redhat.com) wrote:

> 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.

systemd reboots via kexec only if you ask it to. "systemctl kexec" will
reboot via kexec, "systemctl reboot" will do a regular reboot.

> [ 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
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The logs above suggest dracut does kexec in your case, not systemd?

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list