Problem updating GRUB menu on startup with two Manjaro partitions (KDE + GNOME)

Since I like the KDE and GNOME desktop environments, and it is not possible (or at least very difficult) to have them installed at the same time and boot with one and the other, I have created two btfrs partitions and installed one version of Manjaro in each of them, one with KDE and the other with GNOME.

I first installed Manjaro with KDE on one partition and then installed the other Manjaro with GNOME on the other partition.

From the GRUB boot menu everything works perfectly and I can boot with one or the other and I have not had to configure anything, everything is configured automatically during the installation.

But I have a problem: when installing the second Manjaro with GNOME, it somehow became the ‘master’ partition as far as the GRUB menu is concerned, so the changes I make to the other KDE partition over GRUB (for example, when updating the kernel) are not reflected in the GRUB menu until some action is performed on the GNOME partition that updated the GRUB menu (such as updating the kernel, as I mentioned before).

So if I do the wrong order and first update the kernel on the GNOME partition and then do the same operation on the KDE partition, I have to restart the computer and enter the GNOME partition to update the GRUB menu and thus the kernel update is reflected for the KDE partition, which is a nuisance.

Is there a way I can fix or control this so that when I make a change to the partition with KDE that involves updating the GRUB menu, it is reflected immediately when I restart the computer? That is, in some way the partitions work independently and each of them can update what they need in GRUB menu without having to depend on or wait for the other to update it.

the short answer is that each grub boot menu is unique to it’s own install partition… You will have to manually keep them in sync. Decide which one you want to maintain as the default. Always update it last…if a grub or kernel update is going to happen.

My preferred method is to have a number of chroot-{partition-name}.sh scripts to do my updates… ( I have more than 2 install partitions on my devices) … these are available on all my partitions … so I do updates on all boot-able partitions daily … I only reboot for grub or kernel updates after all updates are done.

Oh and grub-update is a very useful tool for syncing each grub menu against the others …

Assuming you are on uefi…you should reinstall grub on one of the oses with a different id parameter and not the default “Manjaro” to keep the separate and not to ovewrite each other, and then boot with the uefi menu between the 2 and not rely on the grub entries for the other os, because they will be incorrect after update

You can use /etc/grub.d/40_custom
to start the (second) Manjaro, this makes both installations more independent.
Furthermore, please do not use the same HOME for KDE and GNOME…
Basically the same as installing Linux and Windows in parallel (==> search Forum).

1 Like

The grub menu only can be controlled from one of the installs, so you need to update your grub controlling system as a second step when you want to have every entry fully up-to-date as you deteremined already. Just get used to perform this in the right order and you will be fine.

I had a similar problem but BIOS/MBR with Manjaro KDE, Manjaro xfce and Win10, but I think UEFI will behave similarly.

Note that the bootloader can only be installed from a Manjaro. The os-prober must be activated here.
No bootloader must be installed from the second Manjaro and the os-prober must be deactivated.
kinda Highlander-ish… :wink:

Instead of avoiding the issue, it’s a bug if both use global variables that need to be in a certain state to work correctly.

OK, it’s not really difficult: After KDE update, manjaro-chroot into the Gnome install, run

# update-grub

exit and then reboot. Make sure os-prober in not disabled in your’s Gnome /etc/default/grub file.