I would like to understand if, and how, it is possible to configure default kernel boot parameters on Red Hat 6 / CentOS 6 (grub legacy bootloader).

I very well understand how to manually configure the required parameters: I simply have to edit /etc/grub.conf and edit the specific stanza. However, a similar configuration will not last a kernel update: the new stanza will be configured with default kernel boot parameters.

Newer system (eg: RHEL7) use grub2 and the /etc/default/grub file and the GRUB_CMDLINE_LINUX variable to solve that specific problem.

So my question is: it is possible to specify system-wide, default kernel boot parameters and let these parameters to be the default settings for new kernels (updated via YUM/RPM) also?



New kernel will inherit kernel cmdline from the last running kernel, so if you make changes to grub.conf, they will persist kernel upgrade.

You can see that by running:

rpm -q --scripts kernel

Relevant lines in RPM scripts are:

(/sbin/grubby --info=`/sbin/grubby --default-kernel`) 2>/dev/null | grep -q crashkernel
if [ $? -ne 0 ]

So, only thing that RPM upgrade does is add crashkernel=auto if it's missing from kernel arguments.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.