Kernel updates on multi-boot laptop and grub2

This is an issue I ran in years ago when having multiple instances of Mageia running for testing. I noticed then that as soon as there are a number of kernels, grub2 just does not have the latest ones as defaults in the grub2 menu when booting. And as this is a UEFI capable box, there is a /boot/EFI partition.
Now I have a similar issue:
My testing laptop has Mageia 9 on /dev/sda2 using grub2. I installed OM Cooker a few weeks ago on separate partitions (/dev/sda5). But I cann’t remember whether I had a choice of boot device during installation or it picked the existing situation. Anyway, I had a working grub2 menu with entries for Mageia and OM (plus advnced for both, and one for UEFI settings).
In the mean time system updates came along and at a certain point I noticed that the default for OM in grub2 remained on the first kernel version (6.9 at that time). in that time there had been another 2 or 3 kernels installed. I didn’t dare to manually change the grub config , it being rather complex. I ran update-grub2 and that nicely listed the kernels it found (including the Mageia), but when I booted, nothing had changed.
I deleted the older kernels in dnfdragora, reran update-grub2, butt that had no effect on the grub2 menu at boot, it still listed the old removed kernels. Remembering the old issues, I booted into Mageia and ther forced the boot loader to OM kernel 6.13 now. That works well, until next kernel?? I don’t know how to control grub2 in another way in OM.

I gave up on Grub dual booting when UEFI systems came into effect. Now, I remove all drives but the one I am installing to. Once complete reconnect all the drives. When booting, as it passes the UEFI, I just hit F8 to get the boot menu and select which system I want. It’s just simpler and I never have to worry about one system borking the others.

I don’t know if anyone else does this, but it works for me.

I also install grub-customizer and tell grub not to look for other OS’es

I no longer dual boot, but I used to run update-grub && grub-install or grub2-mkconfig && grub-install to get the correct kernels showing, can’t exactly remember. There is a way to get os-prober involved in that to always pull in the correct kernel options for your other OS’s, but I can’t remember how to do that either. I do remember when I first switched to linux and was constantly hopping around that my Mint grub couldn’t see my Manjaro install no matter what I tried, but Manjaro’s grub could see Mint but not boot into it. The only solution I found was to write my own custom grub entry and update it manually every time I updated.

1 Like

Check with lsblk to see if the /boot/efi partition is as expected or if installing OM created another. It could be update-grub2 is updating one partition but you are booting from another.
You could also use efibootmgr to see if it lists 2 different boot entries one for mageia and another for OM. This info would be usefull before digging into grub settings.

1 Like

After all these years, one would think that grub would be awesome, but no.

Tx, running grub2-mkconfig got me a decent grub2 menu at boot with all entries I expect, all the old ones have been removed. Now up to the next kernel update, I wonder.

3 Likes

Glad you got it all sorted out.