crashkernel=auto parameter is deprecated in RHEL9
Environment
- Red Hat Enterprise Linux 9
- kdump
Issue
- New kdump kernel fails to boot
- kdump fails to generate vmcore file in newer kernel
crashkernel=autodoes not work
Resolution
Run below command to set crashkernel parameter:
# kdumpctl reset-crashkernel
Root Cause
crashkernel=autois dropped and kernel package now includes acrashkernel.confindicating the defaultcrashkernelvalue of a kernel release.
kexec-toolsshould provide new commands and scripts to update kernelcrashkernelvalue based on this.
Diagnostic Steps
Steps to reproduce:
- Set
crashkernel=autoin/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
- Rebuild the file:
# grub2-mkconfig -o /boot/grub2/grub.cfg
- It appends
crashkernel=autoby 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"
- Reboot the system for
crashkernelto take effect. - Check the current reserved memory size:
# kdumpctl showmem
kdump: Reserved 0MB memory for crash kernel <<--- observe 0 MB
- Test the kdump by manually crashing the machine:
# echo c > /proc/sysrq-trigger
Fails to boot, No vmcore. System reset needed
RESET
- Set the
crashkernelusingreset-crashkernelsub-command:
# kdumpctl reset-crashkernel
- It appends
crashkernel=1G-4G:192M,4G-64G:256M,64G-:512Mby 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"
- Reboot the system for
crashkernelto take effect crashkernelreserves192MB:
# kdumpctl showmem
kdump: Reserved 192MB memory for crash kernel
SBR
Product(s)
Components
Category
Tags
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.