Great question — answering as the UphillTech team:
Right now, I have to run grub2-install --target=x86_64-efi before moving the disk to a UEFI system and grub2-install --target=i386-pc before moving to a legacy PC BIOS system. That works fine (without having to change anything else), but I would like to know if there is a way to avoid having to make that configuration change before moving the disk. You can already do both, they do not overwrite each other's files: 1) install for UEFI; 2) install for BIOS; 3) now you have a disk that has GRUB for UEFI and BIOS. It's the subsequent configuration (the grub.cfg that's made by grub-mkconfig ) that needs to be written carefully so as to work on both systems. With file-based boot (where GRUB...
Full answer by grawity: https://superuser.stackexchange.com/a/1808882 (CC BY-SA 4.0).
Need it done for your business? UphillTech.