Issues in enabling kdump

I want to enable kdump to send a dump to some other developers, in the hope of identifying an annoying bug that crashes my system without even leaving traces in the log.

I have carefully read the documentation on How to use kdump to debug kernel crashes. However, when I restart the system and do systemctl status kdump.service, it reports “Failed to start kdump.service”:

× kdump.service - Crash recovery kernel arming
     Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Tue 2023-07-25 01:42:32 CEST; 3min 32s ago
    Process: 2183 ExecStart=/usr/bin/kdumpctl start (code=exited, status=1/FAILURE)
   Main PID: 2183 (code=exited, status=1/FAILURE)
        CPU: 1.406s

lug 25 01:42:31 nowhere systemd[1]: Starting kdump.service - Crash recovery kernel arming...
lug 25 01:42:32 nowhere kdumpctl[2196]: kdump: Secure Boot is enabled. Using kexec file based syscall.
lug 25 01:42:32 nowhere kdumpctl[2196]: kdump: kexec: failed to load kdump kernel
lug 25 01:42:32 nowhere kdumpctl[2196]: kdump: Starting kdump: [FAILED]
lug 25 01:42:32 nowhere systemd[1]: kdump.service: Main process exited, code=exited, status=1/FAILURE
lug 25 01:42:32 nowhere systemd[1]: kdump.service: Failed with result 'exit-code'.
lug 25 01:42:32 nowhere systemd[1]: Failed to start kdump.service - Crash recovery kernel arming.
lug 25 01:42:32 nowhere systemd[1]: kdump.service: Consumed 1.406s CPU time.

I have tried to manually modify grub’s configuration, in the following alternatives:

GRUB_CMDLINE_LINUX="crashkernel=128M"
GRUB_CMDLINE_LINUX="crashkernel=256M"
GRUB_CMDLINE_LINUX="crashkernel=512M"
GRUB_CMDLINE_LINUX="crashkernel=auto"

followed by sudo grub2-mkconfig, without success.

Am I missing something?

I don’t use the service and I don’t know. However, you might be able to get more information about what is going wrong by (temporarily) adding set -x near the top of the /usr/bin/kdumpctl script and running it from the command line. (It looks like the kdump.service tries to execute /usr/bin/kdumpctl start.)

Thank you! By observing the output, I deduced that the source of the issue was Secure Boot. Once I disabled it in the BIOS, kdump could start.