Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 17. Enabling kdump


For your RHEL 9 systems, you can configure enabling or disabling the kdump functionality on a specific kernel or on all installed kernels. However, you must routinely test the kdump functionality and validate its working status.

17.1. Enabling kdump for all installed kernels

Start the kdump service for all kernels installed on the machine. The service starts after the kexec tool is installed.

Prerequisites

  • You have administrator privileges.

Procedure

  1. Add the crashkernel= command-line parameter to all installed kernels:

    # grubby --update-kernel=ALL --args="crashkernel=xxM"
    Copy to Clipboard Toggle word wrap

    xxM is the required memory in megabytes.

  2. In terms of UKI, add the crashkernel= command-line parameter to all installed UKIs by copying an add-on associated with the required argument from /lib/modules/$(uname -r)/vmlinuz-virt.efi.extra.d/ to /boot/efi/loader/addons/.
  3. Reboot the system:

    # reboot
    Copy to Clipboard Toggle word wrap
  4. Enable the kdump service:

    # systemctl enable --now kdump.service
    Copy to Clipboard Toggle word wrap

Verification

  • Check that the kdump service is running:

    # systemctl status kdump.service
    Copy to Clipboard Toggle word wrap
    kdump.service - Crash recovery kernel arming
         Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: disabled)
         Active: active (live)
    Copy to Clipboard Toggle word wrap

17.2. Enabling kdump for a specific installed kernel

Start the kdump service for a specific kernel on the machine.

Prerequisites

  • You have administrator privileges.

Procedure

  1. List the kernels installed on the machine.

    # ls -a /boot/vmlinuz-*
    Copy to Clipboard Toggle word wrap
    /boot/vmlinuz-0-rescue-2930657cd0dc43c2b75db480e5e5b4a9
    /boot/vmlinuz-4.18.0-330.el8.x86_64
    /boot/vmlinuz-4.18.0-330.rt7.111.el8.x86_64
    Copy to Clipboard Toggle word wrap
  2. Add a specific kdump kernel to the system’s Grand Unified Bootloader (GRUB) configuration.

    For example:

    # grubby --update-kernel=vmlinuz-4.18.0-330.el8.x86_64 --args="crashkernel=xxM"
    Copy to Clipboard Toggle word wrap

    xxM is the required memory reserve in megabytes.

  3. In terms of UKI, add the crashkernel= command-line parameter to a specific UKI by copying an add-on associated with the required argument from /lib/modules/$(uname -r)/vmlinuz-virt.efi.extra.d/ to /boot/efi/EFI/Linux/<machine-id>-<kernel-version>.efi.extra.d/.
  4. Enable the kdump service.

    # systemctl enable --now kdump.service
    Copy to Clipboard Toggle word wrap

Verification

  • Check that the kdump service is running.

    # systemctl status kdump.service
    Copy to Clipboard Toggle word wrap
    kdump.service - Crash recovery kernel arming
         Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: disabled)
         Active: active (live)
    Copy to Clipboard Toggle word wrap

17.3. Disabling the kdump service

You can stop the kdump.service and disable the service from starting on your RHEL 9 systems.

Prerequisites

Procedure

  1. To stop the kdump service in the current session:

    # systemctl stop kdump.service
    Copy to Clipboard Toggle word wrap
  2. To disable the kdump service:

    # systemctl disable kdump.service
    Copy to Clipboard Toggle word wrap
Warning

It is recommended to set kptr_restrict=1 as default. When kptr_restrict is set to (1) as default, the kdumpctl service loads the crash kernel regardless of whether the Kernel Address Space Layout (KASLR) is enabled.

If kptr_restrict is not set to 1 and KASLR is enabled, the contents of /proc/kore file are generated as all zeros. The kdumpctl service fails to access the /proc/kcore file and load the crash kernel. The kexec-kdump-howto.txt file displays a warning message, which recommends you to set kptr_restrict=1. Verify for the following in the sysctl.conf file to ensure that kdumpctl service loads the crash kernel:

  • Kernel kptr_restrict=1 in the sysctl.conf file.
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2026 Red Hat
Retour au début