I have Manjaro and NixOS installed on separate hard disks. Each disk consists of 3 partitions: EFI, OS and swap. My Manjaro recognizes all OSes I have installed in that manner, except for NixOS. Manjaro uses Grub and I do have
osprober, NixOS is installed using
I know almost nothing about
systemd-boot and before I try random stuff my question would be should I even expect this setup to work by having Manjaro selected in BIOS and have it discover NixOS without too much fiddling? If not I would just use grub for NixOS too
Are they using the same efi partition or seperate efi partitions on each disk?
EDIT: Also, is your Manjaro install legacy/mbr or UEFI?
Manjaro is EFI and they use separate EFI partitions.
/dev/sda1: EFI Manjaro
/dev/sda2: Manjaro OS
/dev/sda3: Manjaro Swap
/dev/sdc1: EFI NixOS
/dev/sdc2: NixOS OS
/dev/sdc3: NixOS Swap
More or less like that
It doesn’t look like os-prober on manjaro can find nixos. It doesn’t seem to matter if it is in a separate EFI partition or if they are both in the same partition. I am not sure if there is a way to help os-prober find it.
If not, this probably means you would have to chainload nixos from manjaro’s grub.
As a side note, switching nixos to use grub instead of systemd-boot didn’t seem to change anything. Manjaro’s os-prober still doesn’t detect it.
If you don’t want to deal with setting up grub to chainload nixos, a super simple alternative is to install
refind-efi on manjaro and then run
refind-install. It will autodetect both manjaro and nixos and seems to just work.
Of course, since you have two seperate EFI partitions you could also just use your bios to pick between them.
Thanks for the suggestions! In the meantime I installed grub on NixOS which then finds at least everything else. Meaning I can just boot NixOS first and from its bootloader select whatever I want.
I also made things work by just switching my others distros to systemd and installing them to the same EFI partition as NixOS.
Doesn’t explain the underlying issue though (with regards to Manjaro grub not finding NixOS systemd boot). Honestly my motivation to manually fiddle with Grub entries is rather low so I’ll just be happy with the setup I have now.