So I want to add a few options to the kernel (say iommu
support). I have been told before to avoid using grub2-mkconfig
because it would apply the changes to all currently available (to boot
from) boot kernels. Instead, I should edit just the latest kernel
entry in the grub.cfg file, adding the option to the line that used to
start with "linux16" in centos6. This way, if it went boink, all I had
to do is reboot, pick another kernel from the grub menu and off I
went. And, it seems that every future kernel upgrade would incorporate
this change.
Looking at a centos7.7 setup, I take the equivalent line in
/boot/grub/grub.conf is
kernel /boot/vmlinuz-3.10.0-123.4.4.el7.x86_64 console=hvc0
xencons=tty0 root=/dev/xvda ro
I am now looking into a centos8 and its grub.cfg
(/boot/efi/EFI/centos/grub.cfg in this case) looks rather different.
Is what I have described above still the safest way to customize the
kernel? Or is there a cleaner way to do the same while still leaving
me the option to go back to the grub menu and pick an undisturbed
kernel?