Disable grub update

I’m installing Manjaro and Debian. Each OS will have it’s own partition.

But the ‘boot’ partition is shared.

I only want the Debian grub to maintain the boot/grub system.

Is there a way to disable grub updating the boot system, in Manjaro?

I’ve selected to ‘ignore’ grub from updates.

But what about when a new kernel gets installed?

I’m happy to get the new kernel, but I don’t want pacman to update the grub files/system.

I would do that under Debian.

Thanks.

But what about when a new kernel gets installed?

I’m happy to get the new kernel, but I don’t want pacman to update the grub files/system.

In short: It doesn’t work (like this) :see_no_evil:

  • Grub in Debian does not recognize the correct kernels and options for Manjaro
  • If you update Manjaro and change the kernel, you will end up with an unbootable system if you don’t change Grub’s configuration file before booting.

Sharing /boot/EFI instead of /boot allows you to keep updates to the kernels and changes to the grub configuration file inside the partition of Manjaro.
:footprints:

4 Likes

I have several linux installed on may system and because of “your” trouble i only use Manjaro’s grub to boot my system.

If Debian has overritten Manjaros Grub i go in the grub menue to the second line of Manjaro ( forgot how its called) that also boots the necessary manjaro firmware(?). I do that once to get a running Manjaro … then in Manjaro:

To overwrite Debian grub you have to grub-install /your/EFI/device

Hope that helps

There is the possibillity to use /etc/grub.d/40_custom

  1. Define a “Master-GRUB”, for example Debian.
  2. any other or second OS should be loaded via “chainloading”
    EXAMPLE:
menuentry 'Windows8 (UEFI)' {
insmod ntfs
set root=(hd0,gpt4)
chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
boot
}

And please read:

1 Like

This will only be an issue if you are using a bios system.

With efi systems grub is contained in the systems boot folder - not in the mbr or bios-boot partition.

If you are using EFI there is no issues in running grub-mkconfig - in fact you need to do it - otherwise the new kernel version will not be updated in grub config.

2 Likes

Thanks all for the replies.

I realized something after I posted.

My partitions are:

p1 = /boot/efi - which is not mounted by either OS

p2 and p3 are mounted at /, for each of the OS’s (Debian and Manjaro).

So, /boot, and /boo/grub - they are on the same partition as their OS. They are not shared across the OS’s.

So I think @linux-aarhus will be correct (and my system is not BIOS).

But I do still have some questions/thoughts:

At the moment, Manjaro was installed first, then Debian. Manjaro has not been through an update (of grub or kernel). So the system uses the Debian grub (last one installed), and can boot Manjaro just fine.

ie. so far I’m seeing that Debian can boot the Manjaro install.

How does the UEFI boot system know which grub to use?

If I do an update in Manjaro, would it then get switched to use the grub off the Manjaro partition - ie. is it the last one to get updated?

I know I’d have to run grub-update on either OS, when the other one gets updated.

I’m thinking (hoping) that each grub, will be able to boot the other OS.

There seams to be some doubt about that - does anyone know for sure (what will happen when each OS does it’s grub update)?

I may just give it a try…

EFI boots from a dos exe file which is located in a separate folder for each distribution.

  • $ep/EFI/Manjaro → grubx86.efi

Which efi stub is loaded - in this case Debian vs. Manjaro - depends on which loader is listed first or default in the EFI firmware. You can see and manipulate the order using the efibootmgr command.

When a system get a kernel update - and thus run

grub-mkconfig -o /boot/grub/grub.cfg

And thus creating their own config - and if osprober is enabled - it will add an entry for the system(s) located.

As it can be understood the generated configuration is unique for running system.

I don’t know - in depth - how the process works - what the script grub-mkconfig looks for - if it uses the foreign systems /etc/grub/default - although I think the script looks for /etc/os-release to be able to name the entries in a recognizable way.

Short:

  1. each OS should have its own efi-partition together with the system partition and home-partition.
    The advantage is that you can install this disk in another PC and everything will work.
  2. in EFI-BIOS you select “first boot-device” - meaning this is the “Main OS”
  3. the second OS has to be chainloaded from “first boot-device” and so on.

An update of GRUB has no effect on the other OS, and an update of GRUB
of the second OS does not disturb the “Main-OS”.
And the second OS can be transferred to a new PC too and runs as before.

==> each OS is independent of the other