I have a test all the operating systems-laptop which was running Windows and Ubuntu MATE, with rEFInd used as boot manager.Yesterday I installed Qubes on the last third of the drive. I've since read why you should not but for just testing the OS I would still not mind doing it.Unfortunately I can no longer boot the old OS:es. Neither rEFInd. After some reading I guess Qubes is legacy-boot only, but why that has completely broken my UEFI-booting the old systems I do not know.Qubes installation of grub boots fine, but if I try to launch rEFInd from it it fails:grub> ls(hd0) (hd0, gpt10) (hd0, gpt9) (hd0, gpt8) (hd0, gpt7) (hd0, gpt6) (hd0, gpt5) (hd0, gpt4) (hd0, gpt3) (hd0, gpt2) (hd0, gpt1)grub> chainloader (hd0,gpt3)/efi/Boot/bootx64.efierror: invalid signatureManually trying to select the efi-files from the computers firmware fails, the mouse even hangs when the firmware tries to list available efi-files from the hard drive.Booting rEFInd installed on a thumb drive works fine, so I conclude the firmware on the machine is intact, but the hard drive got messed up by the Qubes installer.What did it do to my drive? How can I restore it?
Qubes clobbered my boot, how can I re-enable efi booting?
boot;uefi;refind;qubes
Looking at the drive with gdisk renders:root@ubuntu-mate:~# gdisk /dev/sdaGPT fdisk (gdisk) version 1.0.1Partition table scan:  MBR: protective  BSD: not present  APM: not present  GPT: presentFound valid GPT with protective MBR; using GPT.Command (? for help): vWarning: The 0xEE protective partition in the MBR is marked as active. This istechnically a violation of the GPT specification, and can cause some EFIs toignore the disk, but it is required to boot from a GPT disk on some BIOS-basedcomputers. You can clear this flag by creating a fresh protective MBR usingthe 'n' option on the experts' menu.No problems found. 2925 free sectors (1.4 MiB) available in 2segments, the largest of which is 2014 (1007.0 KiB) in size.Following the instructions from gdisk:Command (? for help): ?   b   back up GPT data to a filec   change a partition's named   delete a partitioni   show detailed information on a partitionl   list known partition typesn   add a new partitiono   create a new empty GUID partition table (GPT)p   print the partition tableq   quit without saving changesr   recovery and transformation options (experts only)s   sort partitionst   change a partition's type codev   verify diskw   write table to disk and exitx   extra functionality (experts only)?   print this menuCommand (? for help): rRecovery/transformation command (? for help): ?b   use backup GPT header (rebuilding main)c   load backup partition table from disk (rebuilding main)d   use main GPT header (rebuilding backup)e   load main partition table from disk (rebuilding backup)f   load MBR and build fresh GPT from itg   convert GPT into MBR and exith   make hybrid MBRi   show detailed information on a partitionl   load partition data from a backup filem   return to main menuo   print protective MBR datap   print the partition tableq   quit without saving changest   transform BSD disklabel partitionv   verify diskw   write table to disk and exitx   extra functionality (experts only)?   print this menuRecovery/transformation command (? for help): xExpert command (? for help): ?a   set attributesc   change partition GUIDd   display the sector alignment valuee   relocate backup data structures to the end of the diskg   change disk GUIDh   recompute CHS values in protective/hybrid MBRi   show detailed information on a partitionl   set the sector alignment valuem   return to main menun   create a new protective MBRo   print protective MBR datap   print the partition tableq   quit without saving changesr   recovery and transformation options (experts only)s   resize partition tablet   transpose two partition table entriesu   replicate partition table on new devicev   verify diskw   write table to disk and exitz   zap (destroy) GPT data structures and exit?   print this menuExpert command (? for help): nExpert command (? for help): wFinal checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTINGPARTITIONS!!Do you want to proceed? (Y/N): YOK; writing new GUID partition table (GPT) to /dev/sda.Warning: The kernel is still using the old partition table.The new table will be used at the next reboot or after yourun partprobe(8) or kpartx(8)The operation has completed successfully.Reboot and I'm greeted by rEFInd again! Qubes won't boot any more of course.Seems the protective mbr created by Qubes was the problem.