For security reasons I would like to install a secondary completely independent operating system on a single-hard-drive computer using UEFI. Both installations should be able using different LUKS crypto partitions as root device (LVM on top of crypto) and need to be able to use their own kernels.
Having dual boot with two different operating systems is not a big deal. A Ubuntu and Fedora will not interfere and can share the EFI system partition, but two Ubuntu installations will fight with each other because they want both install their Grub instance on the same EFI location.
Is there a way to change Ubuntu to install Grub on a different location than
/boot/efi/EFI/ubuntu
during installation? I need a persistent way, so that package updates and kernel/grub updates still install in that path. Just like how Fedora's Grub would install in/boot/efi/EFI/fedora
. I can't find that configuration option in Grub. If I could, my Dell UEFI boot menu would allow me to choose which OS to load. Perhaps I'm missing some glue between efibootmgr and grub-efi here.Alternatively, would it be possible to use a single Grub installation from one of the two Ubuntu installations and have it automatically detect the right boot settings? I mean, I know
os-prober
will find the other/boot
partition with kernels, but how can it know the right boot parameters for that OS (e.g. LVM volume inside locked crypto volume as root filesystem)? I can understand it can with unencrypted single-partition installations, but it can't match a/boot
with its corresponding root filesystem, right? And it's completely impossible if encrypted. So that would require a lot of manual tweaking of the grub configuration files. I also dislike this option of a single shared bootloader configuration, making the two operating systems less isolated to some extent.
I'm fine with server text-based expert installation, by the way. Also some custom configuration as long as I don't have to repeat the steps for every kernel/Grub update.