Some strange issues with GRUB after updates from 9.2 to 9.3 on Hetzner dedicated servers.
After updates new kernel was in second position.
# grubby --info=ALL | grep ^kernel
kernel="/boot/vmlinuz-5.14.0-284.25.1.el9_2.x86_64"
kernel="/boot/vmlinuz-0-rescue-85f47bbfbf72431286197cf6ff9d0bf1"
kernel="/boot/vmlinuz-5.14.0-362.13.1.el9_3.x86_64"
kernel="/boot/vmlinuz-0-rescue-b890dc22aa144babb696338cefa935db"
# grubby --default-kernel
/boot/vmlinuz-5.14.0-362.13.1.el9_3.x86_64
# grubby --default-index
2
So the first question is, why after updating the new kernel is the 2 index and not the 0 one?
But the main issue was that after the reboot, the old kernel from 9.2 was booted again. To get a new kernel I had to manually do this:
- Manually edit /etc/default/grub and set GRUB_DEFAULT from 0 to 2
- Manually run:
grub2-mkconfig -o /boot/grub2/grub.cfg
So unclear points:
Why after kernel update the new kernel was in not automatically the first option?
Why after reboot system boot into the old kernel, although grubby showed the default kernel and default index for the new one?