crashkernel=auto parameter is deprecated in RHEL9

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 9
  • kdump

Issue

  • New kdump kernel fails to boot
  • kdump fails to generate vmcore file in newer kernel
  • crashkernel=auto does not work

Resolution

Run below command to set crashkernel parameter:

# kdumpctl reset-crashkernel

Root Cause

  • crashkernel=auto is dropped and kernel package now includes a crashkernel.conf indicating the default crashkernel value of a kernel release.
    kexec-tools should provide new commands and scripts to update kernel crashkernel value based on this.

Diagnostic Steps

Steps to reproduce:

  1. Set crashkernel=auto in /etc/default/grub:
# vi /etc/default/grub

GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="crashkernel=auto resume=/dev/mapper/rhel_dhcp131--89-swap rd.lvm.lv=rhel_dhcp131-89/root rd.lvm.lv=rhel_dhcp131-89/swap rhgb quiet"
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
  1. Rebuild the file:
# grub2-mkconfig -o /boot/grub2/grub.cfg
  1. It appends crashkernel=auto by default:
# grubby --info DEFAULT
index=0
kernel="/boot/vmlinuz-5.14.0-39.el9.x86_64"
args="ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet crashkernel=auto"
root="/dev/mapper/rhel-root"
initrd="/boot/initramfs-5.14.0-39.el9.x86_64.img"
title="Red Hat Enterprise Linux (5.14.0-39.el9.x86_64) 9.0 (Plow)"
id="6b56f578b88e45aeaf1502729b134106-5.14.0-39.el9.x86_64"
  1. Reboot the system for crashkernel to take effect.
  2. Check the current reserved memory size:
# kdumpctl showmem
kdump: Reserved 0MB memory for crash kernel  <<--- observe 0 MB
  1. Test the kdump by manually crashing the machine:
# echo c > /proc/sysrq-trigger

Fails to boot, No vmcore. System reset needed

RESET

  1. Set the crashkernel using reset-crashkernel sub-command:
# kdumpctl reset-crashkernel
  1. It appends crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M by default:
# grubby --info DEFAULT
index=0
kernel="/boot/vmlinuz-5.14.0-39.el9.x86_64"
args="ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M"
root="/dev/mapper/rhel-root"
initrd="/boot/initramfs-5.14.0-39.el9.x86_64.img"
title="Red Hat Enterprise Linux (5.14.0-39.el9.x86_64) 9.0 (Plow)"
id="6b56f578b88e45aeaf1502729b134106-5.14.0-39.el9.x86_64"
  1. Reboot the system for crashkernel to take effect
  2. crashkernel reserves 192MB:
# kdumpctl showmem
kdump: Reserved 192MB memory for crash kernel
SBR
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.