[CentOS] Kernel updates do not boot - always boots oldest kernel

Wed Mar 15 07:32:09 UTC 2023
Gianluca Cecchi <gianluca.cecchi at gmail.com>

>
>
> > I have only changed GRUB_DEFAULT from "saved" to "0"
> >
> > I have also run
> >
> > /usr/sbin/grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
>
> I may be wrong here but IIRC, using grub2-mkconfig as described in the
> Grub docs didn't work for me when I tried to use it years ago.
>
> I think you have to find out what is done when installing kernels and try
> to find out where it goes wrong in your case. When you look at 'rpm -q
> --scripts kernel' you can see that new kernels are registered with the
> script '/usr/sbin/new-kernel-pkg'. I suggest to analyze what it does
> exactly. I think it calls 'grubby' to do further work...
>
> Regards,
> Simon
>
>
If not already done, you can also go through the official documentation
page for working with Grub 2 on RH EL 7 and the different commands it is
reporting, both for bios and UEFU based systems.:
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-working_with_the_grub_2_boot_loader

Eventually trying and managing before with some commands on another UEFI
based system/vm that is more practical to use for you, as the target one is
a remote system, as you wrote
HIH,
Gianluca