The Problem
-
kdumptooldoes not support this format of crashkernel parameter, like:crashkernel=0M-4G:160M,4G-8G:192M,8G-:1G -
If I have configured the crashkernel parameter in the format mentioned above, upon installing and enabling kdump, and after regenerating grub.conf and rebooting for the first time, kdumptool will generate a warning log indicating it does not support this crashkernel format.
(1) vim /etc/default/grub; config GRUB_CMDLINE_LINUX
GRUB_CMDLINE_LINUX_DEFAULT="mitigations=auto quiet security="
GRUB_CMDLINE_LINUX=" crashkernel=0M-1G:0M,1G-4G:160M,4G-8G:192M,8G-128G:256M,128G-512G:512M,512G-:1G "
(2) config:
grub2-mkconfig -o /boot/grub2/grub.cfg
zypper in -y kdump
systemctl enable kdump
reboot
(3) Kdump may not work correctly
# journalctl | grep -i kdump
Feb 11 16:01:50 [RPM][1558]: install kdump-2.1.6-160000.1.2.x86_64: success
Feb 11 16:01:50 [RPM][1558]: install kdump-2.1.6-160000.1.2.x86_64: success
Feb 11 16:03:33 systemd[1]: Starting Load kdump kernel early on startup...
Feb 11 16:03:33 systemd[1]: Finished Load kdump kernel early on startup.
Feb 11 16:03:45 systemd[1]: Starting Load kdump kernel and initrd...
Feb 11 16:03:45 kdump-notify[972]: KDUMP_NOTIFICATION_TO not configured
Feb 11 16:03:45 systemd[1]: kdump-notify.service: Deactivated successfully.
Feb 11 16:03:46 dracut[1158]: Executing: /usr/bin/dracut --force --hostonly --hostonly-cmdline --no-hostonly-default-device --add kdump --omit "plymouth resume usrmount zz-fadumpinit" --mount "/dev/disk/by-uuid/bc7f9245-be45-465d-ba7f-37ae797e5c93 /kdump/mnt/ ext4 rw,relatime" --compress "xz -0 --check=crc32" /var/lib/kdump/initrd 6.12.0-160000.9-default
Feb 11 16:03:48 dracut[1158]: *** Including module: kdump ***
Feb 11 16:03:48 dracut[1158]: *** Creating image file '/var/lib/kdump/initrd' ***
Feb 11 16:03:51 dracut[1158]: *** Creating initramfs image file '/var/lib/kdump/initrd' done ***
Feb 11 16:03:51 systemd[1]: Finished Load kdump kernel and initrd.
Feb 11 16:03:51 systemd[1]: Started Check and update kdump options on the kernel command line.
Feb 11 16:03:51 kdumptool[3464]: Kdump expects these crashkernel= values on the kernel command line:
Feb 11 16:03:51 kdumptool[3464]: crashkernel=72M,low crashkernel=381M,high
Feb 11 16:03:51 kdumptool[3464]: (based on the output of 'kdumptool calibrate')
Feb 11 16:03:51 kdumptool[3464]: /proc/cmdline contains:
Feb 11 16:03:51 kdumptool[3464]: crashkernel=0M-1G:0M,1G-4G:160M,4G-8G:192M,8G-128G:256M,128G-512G:512M,512G-:1G
Feb 11 16:03:51 kdumptool[3464]: Kdump may not work correctly
Feb 11 16:03:52 kdumptool[3464]: Updated the command line options in the bootloader.
Feb 11 16:03:52 kdumptool[3464]: Changes will take effect on next boot.
Feb 11 16:03:52 systemd[1]: kdump-commandline.service: Deactivated successfully.
# cat /etc/default/grub | grep -Ew 'GRUB_CMDLINE_LINUX_DEFAULT|GRUB_CMDLINE_LINUX'
GRUB_CMDLINE_LINUX_DEFAULT="mitigations=auto quiet security= crashkernel=72M,low crashkernel=379M,high"
GRUB_CMDLINE_LINUX=" crashkernel=0M-1G:0M,1G-4G:160M,4G-8G:192M,8G-128G:256M,128G-512G:512M,512G-:1G "
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.12.0-160000.9-default root=UUID=bc7f9245-be45-465d-ba7f-37ae797e5c93 crashkernel=0M-1G:0M,1G-4G:160M,4G-8G:192M,8G-128G:256M,128G-512G:512M,512G-:1G mitigations=auto quiet security=
(4) reboot; there will be two crashkernel parameters in /proc/cmdline
# journalctl |grep -i kdumptool
Feb 11 16:12:46 kdumptool[1166]: Kdump expects these crashkernel= values on the kernel command line:
Feb 11 16:12:46 kdumptool[1166]: crashkernel=72M,low crashkernel=379M,high
Feb 11 16:12:46 kdumptool[1166]: (based on the output of 'kdumptool calibrate')
Feb 11 16:12:46 kdumptool[1166]: /proc/cmdline contains:
Feb 11 16:12:46 kdumptool[1166]: crashkernel=0M-1G:0M,1G-4G:160M,4G-8G:192M,8G-128G:256M,128G-512G:512M,512G-:1G crashkernel=72M,low crashkernel=381M,high
Feb 11 16:12:46 kdumptool[1166]: Kdump may not work correctly
Feb 11 16:12:48 kdumptool[1166]: Updated the command line options in the bootloader.
Feb 11 16:12:48 kdumptool[1166]: Changes will take effect on next boot.
# cat /proc/cmdline
BOOT_IMAGE=/boot/vmlinuz-6.12.0-160000.9-default root=UUID=bc7f9245-be45-465d-ba7f-37ae797e5c93 crashkernel=0M-1G:0M,1G-4G:160M,4G-8G:192M,8G-128G:256M,128G-512G:512M,512G-:1G mitigations=auto quiet security= crashkernel=72M,low crashkernel=381M,high
System info
- OS: SUSE Linux Enterprise Server 16.0
- kdump version: kdump-2.1.6-160000.1.2.x86_64
My suggestion
Would it be possible to add support for this format of crashkernel for kdumptool?
crashkernel=0M-1G:0M,1G-4G:160M,4G-8G:192M,8G-128G:256M,128G-512G:512M,512G-:1G