Hi,
I’d like to restart the system via kexec. While I was using kernel-default, all I had to do was to install kexec-tools, enable kexec-load.service and then run sudo systemctl kexec to restart with kexec at will.
But now, I moved from kernel-default to kernel-preempt which causes problem. When running sudo systemctl kexec, I’m getting:
david@atronach-opensuse:~> sudo systemctl kexec
No boot loader entry suitable as default, refusing to guess.
…It looks like the service still expects kernel-default.
So I tried to modify /usr/lib/systemd/system/kexec-load.service with* sudo* systemctl edit kexec-load and put a drop-in snippet to /etc/systemd/system/kexec-load.service.d/override.conf with the following content:
david@atronach-opensuse:~> cat /etc/systemd/system/kexec-load.service.d/override.conf
[Unit]
Description=load kernel into the current kernel
[Service]
ExecStart=/sbin/kexec -l /boot/vmlinuz-$(uname -r) --initrd=/boot/initrd-$(uname -r) --reuse-cmdline
After enabling kexec-load.service and running sudo systemctl kexec, I’m getting the same error again:
david@atronach-opensuse:~> sudo systemctl kexec
No boot loader entry suitable as default, refusing to guess.
Strangely enough, when running kexec directly without the *.service unit, it acomplishes successfully:
david@atronach-opensuse:~> sudo kexec -l /boot/vmlinuz-$(uname -r) --initrd=/boot/initrd-$(uname -r) --reuse-cmdline
david@atronach-opensuse:~> sudo kexec -e
…After that, my system restarts itself while skipping the POST phase and the bootloader during booting which is what is expected with kexec.
Do you please know wow can I integrate kexec into systemd while using kernel-preempt? Thanks.