Kexec broken with 6.3.1 kernel

Kexec is now broken in OpenSuse Tumbleweed with 6.3.1 kernel. Machines do cold reboot instead of kexec reboot.

Kernel:

Linux host 6.3.1-1-default #1 SMP PREEMPT_DYNAMIC Wed May  3 05:18:39 UTC 2023 (8a31779) x86_64 x86_64 x86_64 GNU/Linux

Excerpts from journal:

May 04 18:09:12 host kexec-bootloader[27497]: Can't locate Bootloader/Tools.pm in @INC (you may need to install the Bootloader::Tools module) (@INC contains: /usr/lib/perl5/site_perl/5.36.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.36.0 /usr/lib/perl5/vendor_perl/5.36.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.36.0 /usr/lib/perl5/5.36.0/x86_64-linux-thread-multi /usr/lib/perl5/5.36.0 /usr/lib/perl5/site_perl) at /usr/sbin/kexec-bootloader line 18.
May 04 18:09:12 host kexec-bootloader[27497]: BEGIN failed--compilation aborted at /usr/sbin/kexec-bootloader line 18.

May 04 18:09:13 host systemd[1]: kexec-load.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
May 04 18:09:13 host systemd[1]: kexec-load.service: Failed with result 'exit-code'.
May 04 18:09:13 host systemd[1]: Failed to start load default kernel into the current kernel.

May 04 18:09:14 host systemd[1]: Starting Show Plymouth Reboot with kexec Screen...

May 04 18:09:14 host systemd[1]: Started Show Plymouth Reboot with kexec Screen.

-- Boot bb3c6fa88b694917b3292bbded811cda --

Kexec-tools and perl-bootloader:

$ zypper info perl-bootloader
Loading repository data...
Reading installed packages...

Information for package perl-Bootloader:
----------------------------------------
Repository     : Main Repository (OSS)
Name           : perl-Bootloader
Version        : 1.0-1.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 50.4 KiB
Installed      : Yes (automatically)
Status         : up-to-date
Source package : perl-Bootloader-1.0-1.1.src
Upstream URL   : https://github.com/openSUSE/perl-bootloader
Summary        : Tool for boot loader configuration
Description    : 
    Shell script wrapper for configuring various boot loaders.

$ zypper info kexec-tools
Loading repository data...
Reading installed packages...

Information for package kexec-tools:
------------------------------------
Repository     : Main Repository (OSS)
Name           : kexec-tools
Version        : 2.0.26-3.1
Arch           : x86_64
Vendor         : openSUSE
Installed Size : 324.0 KiB
Installed      : Yes
Status         : up-to-date
Source package : kexec-tools-2.0.26-3.1.src
Upstream URL   : https://projects.horms.net/projects/kexec/
Summary        : Tools for loading replacement kernels into memory
Description    : 
    Kexec is a user space utility for loading another kernel and asking the
    currently running kernel to do something with it. A currently running
    kernel may be asked to start the loaded kernel on reboot, or to start
    the loaded kernel after it panics.

How to fix this issue?

Does it work if you boot previous kernel?

Is it somehow possible to kexec reboot older installed kernel instead of latest within otherwise normal reboot sequence?

I usually kexec reboot from GUI menu or with cli command
shutdown -r +0

For that to work I have:

$ ls -l /etc/systemd/system/reboot.target
lrwxrwxrwx 1 root root 36 Oct  3  2021 /etc/systemd/system/reboot.target -> /usr/lib/systemd/system/kexec.target

I reported this issue yesterday.
https://bugzilla.opensuse.org/show_bug.cgi?id=1211082

It seems is a problem with perl-Bootloader (issue in current version of perl-Bootloader package or compatibility issue between current versions of kexec and perl-Bootloader).

kexec needs Bootloader::Tools perl module, but in current version of perl-Bootloader there isn’t any Bootloader::Tools module.

I have some ideas (not tested) in mind to workaround this issue, but at the moment I prefer to wait they solve the issue.

If you know how and want to test, you can:

  • downgrade perl-Bootloader to a previous version;
    or
  • install perl-Bootloader via CPAN
    but try only if you know what are you doing and at your own risk.
1 Like

Forget about install via CPAN, is not present.
It seems some legacy part of the perl-Bootloader package was removed, but systemd kexec-load service still needs this legacy code.

Thanks for reporting this issue in more detail. I’ll keep waiting for official fix.