Crashkernel parameter is listed twice on kernel line of /boot/grub/grub.conf after kickstart
Environment
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 6.1
Issue
After kickstarting a system with RHEL6 or RHEL6.1, and specifying a custom crashkernel parameter on the bootloader line of the kickstart configuration file, the custom crashkernel parameter shows in addition to "crashkernel=auto" in /boot/grub/grub.conf.
Resolution
This is no longer an issue in RHEL6.2. If your environment requires RHEL6 or RHEL6.1, remove the crashkernel parameter from the "append" section of the bootloader line using a %post script for modification. Here is an example that will change "crashkernel=auto" to "crashkernel=512M@32M":
%post
cd /boot/grub/; cp grub.conf grub.conf.orig; sed -i 's/crashkernel=auto/crashkernel=512M@32M/g' grub.conf; chmod 600 grub.conf
%end
Please note that the crashkernel size and offset will need to be adjusted per environmental needs.
Root Cause
The crashkernel=auto parameter is placed in grub.conf by anaconda by default in RHEL6 and RHEL6.1. Please see the following excerpt from the RHEL 6.1 Technical Notes:
Please note that in future versions of Red Hat Enterprise Linux 6 (i.e. Red Hat Enterprise Linux 6.1 and later) the auto value setting of the crashkernel= parameter (i.e. crashkernel=auto) is deprecated.
Diagnostic Steps
- Install RHEL6 or RHEL6.1 via kickstart with a bootloader line specifying a custom crashkernel parameter. Example bootloader line:
bootloader --location=mbr --driveorder=vda --append="crashkernel=512M@32M"
- Notice that this yields two crashkernel parameters on the kernel line of /boot/grub/grub.conf after installation:
kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/mapper/vg_ipa_rhel6_client-root rd_LVM_LV=vg_ipa_rhel6_client/root rd_LVM_LV=vg_ipa_rhel6_client/swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto crashkernel=512M@32M rhgb quiet
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
