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

Tue Mar 14 11:30:46 UTC 2023
Rob Kampen <rkampen at kampensonline.com>

OK,

found out the problem as to why it doesn't boot any kernel except 36.2

the system reports that it cannot find

vmlinuz-3.10.0-1160.88.1.el7.x86_64

or any one of the others, except for vmlinuz-3.10.0-1160.36.2.el7.x86_64

hence a manual selection from the grub menu when in front of the machine 
will only load the 36.2 kernel

I found that under /boot/grub2 there were two .rpmnew files that mucked 
up the symbolic link to the grubenv file - so fixed that and did a 
reinstall of the latest kernel.

Now all the grub and efi files appear to update correctly - progress.

Now just need to work out why the efi boot process can see the old 
(original) kernel (36.2) but none of the later ones.

Any ideas of where to look for this? seems a much more fundamental 
problem related to kernel install and efi booting

Thanks
Rob

On 14/03/23 22:41, Petko Alov wrote:
> Change it to
>
> GRUB_DEFAULT=0
>
> (I encountered the same issue week ago with a workstation booted for 
> three month with an older kernel because of 
> https://bugzilla.redhat.com/show_bug.cgi?id=2143438 , and solved it 
> this way)
>
> Regards,
>
> Petko
>
>
>
> On 3/14/23 10:51, Rob Kampen wrote:
>> Can I edit /etc/default/grub and change
>>
>> GRUB_DEFAULT=saved
>>
>> to something else?
>