2

So in the process of getting systemd-boot working on one partition, which is its own install, and having another install in parallel which is using grub, I'd like to make systemd-boot, boot to grub as well. I'm using Manjaro, so it installed grub into EFI, but systemd-boot install doesn't seem to pick it up.

P.S. I know chainloading is a grub term, and that systemd-boot isn't really chainloading, as it's not a bootloader, technically, but I'm lacking a better term.

5
  • Actually, systemd-boot is only a bootloader. For now, can you select either option from the BIOS boot menu? Commented Jul 28, 2021 at 21:04
  • @ajgringo619 yes, I can Commented Jul 29, 2021 at 22:20
  • 1
    In theory, this should be doable. Somehow it can auto-detect and chain-load a Windows 10 bootloader, so why not grub? Commented Jul 30, 2021 at 3:07
  • @ajgringo619 right? Commented Jul 30, 2021 at 22:00
  • 1
    I've moved all of my Linux systems to systemd-boot; not a grub fan in the slightest. Next distro I install, I'll give this a shot. Commented Jul 30, 2021 at 22:06

1 Answer 1

1

OK, this ended up being way easier than I thought. Using Debian 10.x XFCE as my base OS, I got it up and running. Next, I installed systemd-boot and verified the new boot entries with efibootmgr. After rebooting, I then proceeded to setup systemd-boot for Debian:

/boot/efi/loader/loader.conf
timeout 10
console-mode auto
editor yes

random-seed-mode with-system-token

Next, the entry for the OS:

/boot/efi/loader/entries/debian-10.conf
title   Debian 10 (testing)
linux   /Debian-10/vmlinuz-4.19.0-17-amd64
initrd  /Debian-10/initrd.img-4.19.0-17-amd64
options root=UUID=207c7201-34a2-41c9-8bff-191cac5a0378 rootflags=subvol=/ resume=UUID=031046e5-7788-43a4-88c6-18b7c08fe55a

Now for the easiest part - the entry for grub:

/boot/efi/loader/entries/grub.conf
title   Grub
linux   /EFI/debian/shimx64.efi

Lastly, I removed the entry for grub with efibootmgr: sudo efibootmgr -b 0004 -B (your entry number will vary)

Reboot and you should see the (2) entries. Now, I would predict that on an update of grub that it will put its boot entry back into EFI, but I can't be sure if it will be the new default or not. Maybe it would be best to leave the entry (since it's already a secondary boot option).

2
  • looks like I forgot to leave a comment, for some reason when booting it was having trouble finding some /boot/... file. I'm not entirely certain why. I think it didn't actually know where to find /boot/ for grub, even though I re-installed grub just before I installed systemd-bootloader. But to be honest. I got regular boot working with systemd boot, so I'm not going to worry about it. Commented Aug 10, 2021 at 16:38
  • 1
    No biggie - I was just happy for the challenge. Since I've converted all of my (systemd) VMs to systemd-boot, it's nice to know that I don't have to get rid of GRUB right away. Commented Aug 14, 2021 at 3:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .