Dual boot incorrectly installed?

Hello,

  • OpenMandriva Lx version: cooker

  • Desktop environment (KDE, LXQT…): Plasma

I installed openmandriva cooker as dual boot on a laptop which has already Mageia 9 on it, and it uses grub2 for booting.
The installation went OK and I can run openmandriva. But the system keeps using the grub2 installation from Mageia. That one detects the openmandriva installation OK.
But when I do a system upgrade (done that about 5 times by now), the process goes thru the movements of configuring grub2, but when I boot, I always get the Mageia-installed grub.
I have a separate /boot/EFI partition on /dev/sda1 but the way Mageia and Openmandriva handle grub on it, seems to be incompatible somehow??? Mageia is installed on /dev/sda2, Openmandriva on /dev/sda5.
If someone can state that this is not the normal situation, I’m perfectly willing to do the installation of OpenMandriva over again, I might have made a mistake during the installation process.

  • Description of the issue (screenshots if relevant):

  • Relevant informations (hardware involved, software version, logs or output…):

You likely have two instances of grub installed. Go to bios and set your boot order to select the OM grub first.

What is the problem with booting from Mageia grub?

The solution can be - after upgrading OMLx do sudo update-grub2 in terminal - this will upgrade grub2 installation and configuration of OpenMandriva, then do reboot and run Mageia. Under Mageia do sudo update-grub2 - this will upgrade Mageia grub installation and configuration including a new one from OpenMandriva.

This process is working on my side (dual boot with Ubuntu 23.10, if I want to use Ubuntu Grub2 menu).

You can also select OpenMandriva Grub in UEFI Boot setup (BIOS) as a default one - this will be updated automatically with OMLx upgrades, but will not include proper kernel upgrades within Mageia - so above process will be necessary, but in different system order.

Answer to Lee as well: there is no problem in booting the OpenMandriva from the Mageia grub menu. It is annooying that every time OpenMandriva installs a new kernel, I have to revert ot booting Mageia and there have the boot system reinstated.
I’ve done multiboots in the past, at one time Win10, Mageia and PCLinuxOS all together and no such detours necessary. The only problem cropping up there was that grub (the old one) did not handle too many enties very well, not putting the latest on top as default.I’ll take the risk of reinstalling OpenMandriva and be carefull on the options I take, I’ll keep you informed.

It is well known and expected that the last system installed will take the boot option.

Yes I know that,
but

  1. I had the experience that on a multibootsystem (at a given point 5 different systems on one laptop) the grub then somewhat chocked when the total numer of entries - kernels exceeded about 12. Then the default remained on version X while X+1 had been installed. But that does not seem to come into play here.
  2. I would expect to have a single grub system on which I could select which OS to boot (OM or Mageia). I think I made the mistake the first time installing OM not to select and mount the existing /boot/efi.
    Anyway I wiped all partitions and made two further attempts: once first installing Mageia, and heve that aon installing /boot/efi and then pointing OM installation to that one. The second in the reverse order.
    In both instances I end up with the same situation: having to ESC at boot and there select one or the other. Both have itself as default and list the other one as well. But that means I have to update both separately when one of them introduces a new kernel.
    It is not unworkable, but less than desirable. I just wonder how I could get the result I would like.

Personally, I prefer to keep each OS separated and click F8 at boot to use the UEFI boot selector. It also allows me to chose one as default. Whichever one I choose, it goes to grub, so I can select snapshots if needed. (That is not working yet on OMLx)

F8 may or may not be your key for Boot Menu.

I do not know why your installation ended up this way. What others have said about the last installed system should take over boot is correct. This is how I multi-boot using a preferred system as boot-loader. (Currently I use a OMLx Rock/5.0 as boot-loader, booting 3 or more Linux systems.)

But this might correct the problem:

Boot in to Mageia partition and:

sudo update-grub2

sudo grub2-install /dev/sda2

Then boot in to OpenMandriva partition and:

sudo update-grub2

sudo grub2-install /dev/sda

Reboot and you should have OM grub2 menu.

1 Like

To wipe out the other thing is an option too :grin:

1 Like

@ ben79
Done that, looks good. Now wait til one of them draws in a new kernel. But if there si a problem there, it’s most probably an issue of grub2 as I explained above, not OM’s or Mageia’s.

What those commands do is the when your Mageia system installs a new kernel the boot-loader gets written to /dev/sda2 so that won’t change the grub2 menu you see. But you won’t have the new kernel available unless you then run sudo update-grub2 on the OM system to add the new Mageia kernel to the grub2 menu.

When OM has a new kernel that rewrites the boot-loader to /dev/sda which is what you want.

What would change this is installing a new system. Then you need to go through the same process again.

So to keep the same system as boot-loader requires maintenence. The no maintenence alternative is to accept a rotating boot-loader dependent on which system last installed a kernel. Basically the maintenance is to run sudo update-grub2 in the boot-loader system everytime there is a new kenrel installed in any non-boot-loader system.

And I do hope this makes sense.

3 Likes