desktop Kubuntu 22.04.5 LTS up to date
/dev/nvme0n1p1 /boot/efi
/dev/nvme0n1p2 /
/dev/nvme0n1p3 /home
last year I installed along side with it kubuntu 25.04 on
/dev/nvme0n1p4
Everything was working fine.
These days I’ve read that the last OS installed (in a dual boot configuration) is the one who installed grub in MBR and whose /boot/grub/grub.cfg it is used.
And I decided to run grub-install from 22.04.5 so this will become the main OS.
So I run grub-install from 22.04.5 , then update-grub and reboot.
Now grub show me only this 22.04.5 choice, no 25.04 anymore.
When I run os-prober in 22.04.5 it doesn’t show me anything,
like it is not seeing the partition with 25.04
I already have GRUB_DISABLE_OS_PROBER=false
in /etc/default/grub
Any idea why it doesn’t see 25.04 and how can I make it see it? (beside using a 25.04 live cd and reinstall grub from 25.04)
In recent releases, os-prober has been disabled for security reasons.
If enabling it in the grub config did not work, as you reported, then there are a couple of additional things to try and resolve.
My personal favourite which I use on multiple installs is to create a custom menu entry.
sudo nano /etc/grub.d/40_custom
menuentry 'Xubuntu' --class gnu-linux --class gnu --class os {
search --no-floppy --fs-uuid --set=root 9078ea23-f973-44f7-baf4-ea6177ce660f
linux /boot/vmlinuz root=UUID=9078ea23-f973-44f7-baf4-ea6177ce660f ro quiet splash
initrd /boot/initrd.img
}
Change the menu entry to, for example, Ubuntu 25 or whatever you want.
For the UUID, check lsblk -f and find the correct name for the entry you want to add.
Note that you need to enter the UUID twice in the custom entry.
Once you have double-checked your new custom entry, Ctrl+O to write, press Enter, then Ctrl+X to exit.
Run sudo update-grub
Reboot and you should see the entry on GRUB and choose which release to boot into.
What I am suggesting assumes you are creating the custom entry in 22.04
If you want it the other way around, meaning that 25.04 controls GRUB you will probably need to chroot into it from a liveUSB to make those changes but it seems to me this would be an easier solution.
Can confirm, I have os-prober enabled and 22.04 os-prober sees my 2 24.04 in 2 different partitions but does NOT see Ubuntu 25.04 and Debian trixie/sid on other partitions.
I was also thinking to copy the relevant entries from grub.cfg of 25.04 partition into grub.cfg from 22.04.5 partition, but I’ll need to do that after each kernel upgrade (in either OS).
If this happens to others it means it’s some incompatibility thing between the 2 versions.
If you use a 40_custom entry that should not happen.
I have 3 different distros and as long as the UUID is correct in the entry I have never had to redo anything after major updates/upgrades including to the kernel.
I too multi-boot: 22.04. 24.04, and 25,04. My procedure to control grub is to disable os_proper in my secondary systems (sudo chmod -x /etc/grub.d/30_os-prober) - and I have 24.04 as my primary that controls grub’s boot menu. Each time there is a change in my secondaries I do run sudo update-grub in my primary to pick up on the changes,
Also as a viable alternative, I direct attention to: MaintenanceFreeCustomGrub2Screen - Community Help Wiki
A bit of a hassle to set up but I can affirm that it works well for those of us who do not wish to be hands on,
using a custom grub menu in 22.04 didn’t work to start 25.04 from the correct partition.
Strangely the message was "cannot find device uuid: ...." despite the fact the uuid was correct.
I even took the menu entry from grub.cfg from 25.04 and put it in 40_custom in in 22.04, it has some extra lines:
recordfail
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
the same message appeared "cannot find device uuid: ...." then kernel panic …
I ended up re-installing grub from a 25.04 livecd.
All is good now.
You mention MBR, but have ESP - efi system partition. Make sure all installs are UEFI. And always boot in UEFI boot mode.
I use 40_custom for booting all my other installs by label. Only if an install reinstalls grub, do I have to boot into main install & reinstall grub from there or use efibootmgr to change boot order and if on same drive & same ESP, manually change UUID to my main working install.