Dual Manjaro Installation - GRUB issues

Hi,
I have installed a second Manjaro on a second SSD.
My problem is that the second Majaro will use the GRUB of the first Manjaro.
Example:
if I set IPv6.disable=1 in Majaro #1, it will disable it on both installations #1 and #2.
If I set IPv6.disable=1 in Majaro#2, it will not happen anything on any installations.
However, in GRUB, name are different and reflect on the boot menu
GRUB_DISTRIBUTOR=“Manjaro”
GRUB_DISTRIBUTOR=“Manjaro 2”
Also, you will see below that efibootmgr shows that both installations use the same bootable.

So my question is: how can I get an independent GRUB for Manjaro #2 ?

PS: when I installed Majaro #2, I let the system to install it, I dont remember where the boot was installed
PS2: each OS is installed on a different SSD, first OS installed was Windows, then Manjaro #1

Info:

lsblk
sdb 8:16 0 465.8G 0 disk (Manjaro #2)
├─sdb1 8:17 0 300M 0 part
├─sdb2 8:18 0 456.7G 0 part
└─sdb3 8:19 0 8.8G 0 part
sdc 8:32 0 232.9G 0 disk (Manjaro #1)
├─sdc1 8:33 0 60G 0 part /
├─sdc2 8:34 0 172.4G 0 part /home
└─sdc3 8:35 0 512M 0 part /boot/efi
nvme0n1 259:0 0 232.9G 0 disk (Windows)
├─nvme0n1p1 259:1 0 100M 0 part
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 232.3G 0 part
└─nvme0n1p4 259:4 0 530M 0 part

Info Manjaro #1:

inxi -Fazy:
Kernel: 6.6.19-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
clocksource: tsc avail: hpet,acpi_pm
parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
root=UUID=67ea18b4-7b25-4064-88a8-06524a1949b1 rw ipv6.disable=1 quiet
udev.log_priority=3
Desktop: KDE Plasma v: 5.27.11 tk: Qt v: 5.15.12 info: frameworks
v: 5.115.0 wm: kwin_x11 vt: 2 dm: SDDM Distro: Manjaro base: Arch Linux

os-prober
/dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/sdb2:Manjaro 2 (23.1.4):ManjaroLinux:linux

efibootmgr
BootCurrent: 0008
Timeout: 0 seconds
BootOrder: 0008,0001,0005,0009,000A,0000,0003,0004,0006,0007,0002,000B,000C

Info Manjaro #2

os-prober
/dev/nvme0n1p1@/efi/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi
/dev/sdc1:Manjaro Linux (23.1.4):ManjaroLinux:linux

efibootmgr
BootCurrent: 0008
Timeout: 0 seconds
BootOrder: 0008,0001,0005,0009,000A,0000,0003,0004,0006,0007,0002,000B,000C

Hi @Chani266, and welcome!

While I’m not sure I’ll be the one to be of assistance, I will be the one to give you the introduction. In order for us, or anyone for that matter, to be able to provide assistance, more information is necessary. To that end, please see:

Please also note and heed: Forum Rules - Manjaro

Hope you manage!


:bangbang: Tip: :bangbang:

To provide terminal output, copy the text you wish to share, and paste it here, surrounded by three (3) backticks, a.k.a grave accents. Like this:

```
pasted text
```

Or three (3) tilde signs, like this:

~~~
pasted text
~~~

This will just cause it to be rendered like this:

Portaest sed
elementum
cursus nisl nisi
hendrerit ac quis
sit
adipiscing
tortor sit leo commodo.

Instead of like this:

Portaest sed elementum cursus nisl nisi hendrerit ac quis sit adipiscing tortor sit leo commodo.

Alternatively, paste the text you wish to format as terminal output, select all pasted text, and click the </> button on the taskbar. This will indent the whole pasted section with one TAB, causing it to render the same way as described above.

Thereby improving legibility and making it much easier for those trying to be of assistance.


:bangbang::bangbang: Additionally

If your language isn’t English, please prepend any and all terminal commands with LC_ALL=C. For example:

LC_ALL=C bluetoothctl

This will just cause the terminal output to be in English, making it easier to understand and debug.

juste redo grub-install with option
–bootloader-id=< name >

see How can I install Manjaro without installing GRUB? - #23 by wongs

example MJROKDE , MJROGNM , MJROXFCE

1 Like

If you have 2 esp partitions on 2 different disks, it may be better to switch disks from the uefi menu.
If you use one esp, or maybe even in the first case for disambiguity, you have to reinstall grub with a different name (not manjaro).
As posted above me. The installer installs the bootloader always with the name manjaro, which means overwrite or ignore on the second install so in any case you are using 1 bootloader for both.

So when you reach that step

root # grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro2 --recheck

1 Like

I find that applying an unique label to the $esp is also a valid method to distinguish between two instances (separate disks, each with its own ESP).

Example: ESPMAN1 and ESPMAN2, depending on how creative you might wish to be.

Couple this with the previous suggestions by either @stephane or @Teo and you should have a fairly foolproof solution.

However, I must add that when two instances of Manjaro are installed - each to their own disk - then the UEFI boot files are also written to each separate $ESP, respectively.

It’s then only a question of choosing whichever $ESP (ESPMAN1 or ESPMAN2) that you wish to boot with. Each instance should be detected automatically by the other.

In this scenario it arguably serves no purpose to install the Manjaro UEFI boot files to a custom directory (it does no harm, either).

Cheers.

1 Like

Hi, thanks for your reply
I read the thread you referred to, but I am not export enough to understand all.
To make sure before I proceed:

  • I should run the grub-install command when I log in my Manjaro #2, correct ?

also, I have a boot/efi partitions on sdb and sdc.

  • is that the correct way to set up ?

Hi
I have indeed 2 ESP, boot/efi on sdc and sdb
If I understand your answer correctly, that’s the way it should, correct ?

Hi,
I do not understand “it may be better to switch disks from the uefi menu”
Could you please elaborate ?

I have 2 esp partitions, one on each disk sdb and sdc
when I switch on, I do have the option to choose Majaro#1, Majaro#2
Thanks for your help

Yes, that’s correct.

I mean you can hit F2 or F12 when you boot, just how you boot from usb for example.

Thanks !
So, if I understand all correctly, I need to long in Manjaro #2 on sdb, run grub-install with the correct parameters, am I correct ?

The easiest is to install each OS separately, with only one disk connected at a time.

Note: Disconnect other connected disks not needed during installation (especially those containing another OS) before continuing. Each OS needs to be protected from the affects of installing another OS, to remain as self-contained as possible. This helps to prevent unnecessary complication and avoid the possibility of data loss.

As you seem to have installed both instances already, it’s too late to do that during install.

However, it may still be worth disconnecting one disk; and reinstalling GRUB 2 so that it installs to the current ESP (the only one available while the other disk is removed).

When finished reinstalling GRUB 2, shut down and disconnect this disk; reconnect the first one, and reinstall GRUB 2 for that Manjaro instance.

When finished, shutdown and reconnect both disks again; then boot to the UEFI BIOS and choose which ESP to place first in boot order. The UEFI boot files on that ESP should detect GRUB 2 on both ESP’s. Any subsequent updates should then only update GRUB 2 and UEFI boot files of the currently booted Manjaro instance - Boot to the other instance to likewise update on the other.

Consider also ensuring that the alternate Manjaro’s / (root) partition isn’t mounted (in each instance).

I hope this helps. Cheers.

1 Like

Hi, thanks for your answer.
I did actually disconnect my Manjaro#1 before installing Manjaro#2.
But I did not reinstall GRUB on Manjaro#1
I will try
Thanks !

Hi all, I think I finally found out the issue.
I reinstalled several times the OS on both disk, resulting in a real messy boot loader entries
I finally managed to “allocate” different bootloader to each disk. Not perfect, but it will do the job for the moment.
I guess I will have to reinstall everything one day, and deleting all old bootloaders.
Thanks a lot for your help.
Cheers

Look at the efibootmgr command:

$ tldr efibootmgr
  Manipulate the UEFI Boot Manager.
  More information: <https://manned.org/efibootmgr>.
  List the current settings then bootnums with their name:
      efibootmgr
  List the filepaths:
      efibootmgr -v
  Add UEFI Shell v2 as a boot option:
      sudo efibootmgr -c -d /dev/sda1 -l \EFI\tools\Shell.efi -L "UEFI Shell"
  Change the current boot order:
      sudo efibootmgr -o 0002,0008,0001,0005
  Delete a boot option:
      sudo efibootmgr -b 0008 --delete-bootnum

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.