Setting up grub for a multi distro boot

I recently switch from Ubuntu to Manjaro-KDE, but i didn’t get rid of Ubuntu (for the moment). So i have three OSs on my hard drive: Windows 10, Ubuntu 22.04, and Manjaro.

The partitions on the hard drive looks like:

sudo fdisk -l
[sudo] password for guillaume:
Disk /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: HGST HTS541010A9
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: DC5963E7-81B7-447B-BBEA-07F44F1E5BDB

Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 2050047 1843200 900M Windows recovery environment
/dev/sda3 2050048 2312191 262144 128M Microsoft reserved
/dev/sda4 2312192 783718399 781406208 372,6G Microsoft basic data
/dev/sda5 783718400 1520842751 737124352 351,5G Microsoft basic data
/dev/sda6 1922045952 1953523711 31477760 15G Windows recovery environment
/dev/sda7 1679405056 1909131263 229726208 109,5G Linux filesystem
/dev/sda8 1520842752 1522939903 2097152 1G Linux filesystem
/dev/sda9 1909131264 1922045951 12914688 6,2G Linux swap
/dev/sda10 1522939904 1679405055 156465152 74,6G Linux filesystem

Partition table entries are not in disk order.

My problem is that it is Ubuntu that “controls” the the boot loader. How can I give this privilege to Manjaro instead of Ubuntu?

You could boot a live USB of manjaro and chroot into the manjaro system then update grub from there. That should work

Thank you i try it now!

One GRUB for Main-System, others integrated with /etc/grub.d/40_custom
==> 40_custom must chainload the GRUB of the other System.

menuentry 'Windows 10 starten' --class windows --class os $menuentry_id_option 'osprober-efi-68DF-72BD' {
	insmod part_gpt
	insmod fat
	set root='hd0,gpt2'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  68DF-72BD
	  search --no-floppy --fs-uuid --set=root 68DF-72BD
	chainloader /efi/Microsoft/Boot/bootmgfw.efi
set timeout_style=menu
if [ "${timeout}" = 0 ]; then
  set timeout=10

This enables each System to update its own GRUB.

Thank you for your help, my issue is solved.
For others having the same issue:

I tried what @sawdoctor but it didn’t work for me, so i reinstalled grub and it works!

In the live session, open a terminal and type:

sudo mount /dev/sda10 /mnt
manjaro-chroot /mnt
sh-5.1# mkdir /boot/efi sh-5.1# mount /dev/sda1 /boot/efi
sh-5.1# grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
Installing for x86_64-efi platform.
Installation finished. No error reported.
sh-5.1# grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file …
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/amd-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your
grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your
Found Ubuntu 22.04 LTS (22.04) on /dev/sda7
Adding boot menu entry for UEFI Firmware Settings …
Found memtest86+ image: /boot/memtest86+/memtest.bin

Thanks @GaVenga for your comment, i will have a look at it if I want to keep Ubuntu and set it up properly.

1 Like