Hi misc@,
I just cracked this and it doesn't seem to be well documented so I
thought I'd stick it here.
My setup is a VAIO laptop dualbooting Ubuntu 16.04 and OpenBSD -CURRENT.
I've got sd0a setup as a cryptoraid partition, so I needed a way to
chainload into the OBSD bootloader to get a prompt to decrypt the
partition. The following syntax in grub2 (say in /etc/grub.d/40_custom
on the linux side) works:
menuentry 'OpenBSD/amd64 normal kernel' {
insmod part_gpt
insmod search_fs_uuid
insmod chain
chainloader (hd0,gpt1)/EFI/boot/BSD.BOOTX64.EFI
}
menuentry 'OpenBSD/amd64 ramdisk kernel' --class os {
set root='(hd0,gpt3)'
kopenbsd /bsd.rd
}
Don't forget to run update-grub after editing 40_custom. The gpt1
partition corresponds to the EFI one that any OS using UEFI creates. You
can name the BSD bootloader whatever you want with this, and put it in
it's own dir if necessary. I have shimx64.efi renamed to bootx64.efi as
my grub "preloader".
The second menu entry is for a bsd.rd placed in the ext2 /boot partition
Linux uses to access it's kernel upon boot from grub. Many thanks to
oldlaptop on Freenode for working out the grub2 syntax.
Cheers,
Noth
P.S: Don't CC me, I'm subscribed to the mailing list.