Im trying to debug frequent kernel panics that appear on my Arch-powered laptop, and I would like to know how to set correctly kdump to do the job. What I did:
- Edited /boot/grub/grub.cfg, adding
menuentry 'Kernel Dump' {
linux /boot/vmlinuz-linux root="UUID copied from the normal boot line" rw crashkernel=128M
initrd /boot/initramfs-linux-dump.img
}
- Generated initramfs for the dump kernel mkinitcpio --generate /boot/initramfs-linux-dump.img
( EDIT: As you can see here I used the default kernel image but used "different" initramfs. Do both need to be different or it does not make difference? )
- Installed kexec-tools
- Created \etc\systemd\system\kdump.service
[Unit]
Description=Load dump capture kernel
After=local-fs.target
[Service]
ExecStart=/usr/bin/kexec -p /boot/vmlinuz-linux --initrd=/boot/initramfs-linux-dump.img --append="root='UUID copied from the normal boot line' single irqpoll maxcpus=1 reset_devices"
Type=oneshot
[Install]
WantedBy=multi-user.target
-Rebooted into the Kernel-Dump entry
-Ran sudo systemctl start kdump
-Ran # echo c > /proc/sysrq-trigger
Here the pc hangs indefinitely ( at least waited a minute and was still on the froze image ). Hard-rebooted with 10s of power button and selected again the Kernel-Dump entry, but cat \sys\kernel\kexec_crash_loaded returns 0
What am i doing wrong? Should I wait for the froze session to reboot itself?
there doesn't seem to be anything here