Can Grub2 multi-boot LUKS/LVM distros with only one boot partition

boot-loaderdual-bootgrub2lukslvm

There are many tutorials on the internet for multi-booting unencrypted distros using a single boot partition and chainloading. For example, booting 145 OSes.

Likewise, there are tutorials for multi-booting distros inside LUKS/LVM if multiple (unencrypted) boot partitions are used, by having the main bootloader chainload the bootloaders in the other unencrypted boot partitions. For example, multi-boot on LUKS.

But I have not been able to find any information about multi-booting with these constraints:

  • Only one (or none) unencrypted boot partitions
  • No external USB keyfile needed
  • No manual steps, other than selecting the distro to boot, and entering the LUKS passphrase (only once)

Is it possible, and if so, how?

The partition arrangement I'm thinking of is:

  • sda1, boot partition
  • sda2, LUKS container

The LUKS container is managed by LVM:

  • swap, shared among all distributions
  • [ home, shared among all distributions ]
  • root1, main distribution, mounting sda1 as /boot
  • root2, distribution 2, including encrypted /boot
  • root3, distribution 3, including encrypted /boot
  • etc.

The closest information I've been able to find has a lot of manual steps: only bootloader unencrypted.

Best Answer

You don't even need a separate, unencrypted /boot partition with grub2. See http://www.pavelkogan.com/2014/05/23/luks-full-disk-encryption/ . Rather than having a separate /boot partition (anyhow, it's not a good idea to share your boot partition among distros), I recommend having a separate grub partition (/boot/grub) that's shared among your distros. That way, you can delete any distro you want without having to worry about your grub going haywire as long as you don't touch the grub partition.

Related Question