How should the crashkernel parameter be configured for using kdump on Red Hat Enterprise Linux 5?

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 5
  • kdump/kexec being used to capture vmcore

Issue

  • How should the crashkernel parameter be configured for using kdump on Red Hat Enterprise Linux 5?
  • What is the recommended RAM size to reserve for kdump kernel for different different sizes of RAM?
  • I am using the crashkernel kernel parameter, but after boot the system writes kernel: crashkernel reservation failed - memory is in use. How to correctly configure the parameter?
  • Kernel panic with crashkernel warning Memory for crash kernel (0x0 to 0x0) not within permissible range

Resolution

  • The following table can be used as a guide:
crashkernel=memory@offset

+---------------------------------------+
| RAM       | crashkernel | crashkernel |
| size      | memory      | offset      |
|-----------+-------------+-------------|
|  0 - 2G   | 128M        | 16M         | 
| 2G - 6G   | 256M        | 24M         | 
| 6G - 8G   | 512M        | 16M         |
| 8G - 24G  | 768M        | 32M         |
+---------------------------------------+
  • For RAM size greater than 24G:

    • Try crashkernel memory 768M and RAM/crashkernel offset of 32, which looks like 768M@32M.
    • If you get an Out-Of-Memory error message, then try with increasing the crashkernel parameter to 896M
  • Depending on your system BIOS memory layout, you may need to alter the offset.

  • A complete procedure to correctly determine the maximum possible size and precise offset is located at:

Additional Notes

  • Always test to ensure that the kdump service starts correctly and that the system is able to correctly dump by initiating a test.

  • The offset for the kdump memory reservation (crashkernel=X@Y) must be specified in RHEL5. Not specifying offset (crashkernel=X) is not a valid configuration under RHEL5, although it is valid under RHEL6.

  • kdump fails to initialise with crashkernel=1024M@16M on RHEL5 kernels earlier than 2.6.18-274.el5

  • RHEL6's kdump is more memory-efficient than RHEL5's. It is likely more memory will need to be assigned on RHEL5 than on the same system running RHEL6.

  • The crashkernel parameter goes on the kernel line of GRUB's config file /boot/grub/grub.conf and is added to the existing parameters. For example:

    • Before: kernel /vmlinuz ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    • After: kernel /vmlinuz ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=X@Y
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.