0

I'm trying to add a kernel option "xxx" by adding it to the existing

GRUB_CMDLINE_LINUX="xxxx crashkernel=auto rhgb quiet"

line in /etc/default/grub, but after doing so, when I run

grub2-mkconfig –o /boot/grub2/grub.cfg

it produces exactly the same grub.cfg file as before (confirmed with diff).

What am I missing?

I'm running CentOS Linux release 7.6.1810 (Core)

0

I'm not using CentOS (so can't test it), but this should do it:

GRUB_CMDLINE_LINUX="xxxx crashkernel=auto rhgb quiet ${GRUB_CMDLINE_LINUX}"

  • I tried this, ran grub2-mkconfig -o file1, and it produced the desired "xxx" kernel option, previously missing. Then I removed your suggestion and ran grub2-mkconfig -o file2, diff'd the two files, which should have produced the original grub.cfg that I had yesterday, but it did not. Not only is it the same as file1 (both now have my new "xxx" kernel option, with or without your suggestion) but they are different now from my original grub.cfg, the biggest difference being that it's changed all my hd0 to hd2. So now I'm really confused. – astronomerdave Nov 11 at 19:35

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.