I see. I'm guessing your firmware only attempts to read from /boot/efi/EFI/BOOT/BOOTX64.efi, even if the menu entry has a different path? I think an approach like this could work for managing EFI directories manually. Automated by a script of course, but still manual in the sense it's not handled by the OS.
I was really hoping there was a config setting or variable somewhere that could change the EFI directory, e.g. to /boot/efi/EFI/<whatever>/. On systems that use grub-install, this is specified by --bootloader-id= argument. So in that case you may be able replace /usr/bin/grub-install with a wrapper script that forces your desired --bootloader-id argument. However Fedora doesn't use grub-install, it uses a package which installs a prebaked grubx64.efi binary which is installed to the hardcoded path /boot/efi/EFI/fedora. This is in order to support Secure Boot. I'm assuming Qubes does it the same way. I'm also assuming that "fedora" gets changed to "qubes" by a patch or a compile-time variable but is not configurable at runtime. Maybe there's an option in Yum/dnf similar to apt's redirect option, to configure a file to be installed at a different path than what it's packaged as. I have no idea.
I did some research, and apparently this is a very common flaw. In fact, Mint uses the hardcoded directory /boot/efi/EFI/ubuntu/, meaning you can't dual boot Mint and Ubuntu from the same ESP. But the good news is that you can use more than one ESP, as long as your firmware supports it (it sounds like most of them do). So that's also an option. I was originally worried it would cause problems that they're using the same UUID, but actually they don't. I was confusing the filesystem UUID, which is unique, with the GPT partition identifier (GUID), which is a magic value. And I remembered you could also mount them by label anyway. https://www.zdnet.com/article/hands-on-linux-uefi-multi-boot-part-three-problem-solving/
So I guess I could use /boot/efi/EFI/qubes/ as a sort of staging area for both instances of Qubes, and then religiously after every update, run a script to move the directory to /boot/efi/EFI/qubes{0,1,...}, and then delete the newly-created efibootmgr entry for \EFI\qubes\grubx64.efi and (if necessary) re-create the one for \EFI\qubesN\grubx64.efi. Or, perhaps there's some way to prevent modification of efibootmgr entries so the package install hook (or whatever) can't mess with it.
I decided I'm going to try the dual-ESP approach first and see if it works. If not, then I'll try the EFI directory hack.
I formatted my disk like: ESP, /boot, root, ESP, /boot, root, (swap); and installed Qubes into the first "slot". I still have to install another Qubes instance into the second "slot" and make sure they both work. I'll follow up when I do.
The dual ESP approach seems to be working fine for me, but you do have to manually fiddle around with efibootmgr. The installer overwrites existing Qubes entries, although I'm not sure what exactly it looks for. Maybe changing the label would be sufficient to preserve it.
Dual booting R4.1 and R4.0, both using btrfs on dm-crypt. I can't speak to how LVM or anything else might be affected.
I'm wondering what the best way is to go about installing two instances
of Qubes 4.1 on the same machine, which are more or less independent of
each other.
It's fairly easy to dual boot different OSes because they each have
their own EFI directory, e.g. /boot/efi/EFI/{qubes,fedora,ubuntu}, but
what happens when you want to dual boot two of the same OS? (Or two
different releases of the same OS?)