In my ideal setup, my laptop would boot into Ubuntu by default, but have a grub entry to switch over to the Qubes bootloader on demand.
This setup isn't covered by https://www.qubes-os.org/doc/multiboot/ so I figured I'd give it a shot myself.
I installed Qubes, but elected not to make the install device bootable (since I want to keep Ubuntu in charge of booting). Then I found the Qubes bootloader partition at /dev/sda7 and attempted to add a chainloader entry to /etc/grub.d/40_custom like this:
menuentry "Qubes Chainloader" {
insmod chain
insmod ext2
set root=(hd0,gpt7)
chainloader /EFI/qubes/xen-4.6.1.efi
}
I can select 'Qubes Chainloader' at the grub menu, but it just flashes a message (I think it's something like "Loading xen-4.6.1.efi") for the briefest instant before dumping me back into grub. For what it's worth, I know it's at least finding the .efi file because it no longer complains that it can't.
TL/DR: what can I put in /etc/grub.d/40_custom to chainload the Qubes /boot partition at /dev/sda7?
Right! I came across that and I was hoping to basically do the reverse, where the Ubuntu bootloader comes first and has an option for Qubes. Unfortunately, I couldn't get it to work.
I'm waiting for that answer as well.
Just closing the loop here. I couldn't get Qubes to boot in the original setup, so I decided to try again from scratch and ended up finding a pretty easy solution that works well for me.
1. I installed Ubuntu 16.10 with the default partition scheme.
2. I used gparted to free up 60gb of free space at the end of the drive for Qubes.
3. I ran the Qubes installer and let it automatically manage that 60gb. I didn't change any settings in the partition screen (including bootloader).
**note** at this point, I could use my BIOS menu to boot either Ubuntu or Qubes if I wanted, so I could have stopped.
4. I went back to the Ubuntu USB key and ran Boot-Repair (https://help.ubuntu.com/community/Boot-Repair) to add entries for Qubes to grub.
5. I changed the default boot device in my BIOS back to Ubuntu's boot partition.
The result was that Ubuntu's grub menu is the default, and it includes entries for Qubes that work as expected.