I recently upgraded a Ubuntu box (a rackmount server) from 20.04 to 22.04. However, the "grub" boot menu kept listing kernel 5.4.0-40 as the default kernel entry regardless what I did - and I've tried many different things
- run
update-grub - run
grub-install --target=.. /boot/efi - disable UEFI boot and only allow legacy mode in the BIOS
- remove the ubuntu folder inside
/boot/efi/ - umount
/boot/efiand disable it from/etc/fstab - or even completely delete the /dev/nvme0n1p1 partition that was mapped to
/boot/efi
regardless what I did, the boot menu is UNCHANGED! I don't know what was the issue. /boot/grub/grub.cfg clearly shows the 5.15 and 5.17 kernels as the top two options that I installed as part of the 22.04 upgrade, but they could not be shown and used.
I also installed efibootmgr and run efibootmgr -r, it complains "EFI variables are not supported on this system".
can someone let me know what was wrong? how can I update the boot menu?