I recently got an SSD to replace my laptop's HDD and decided to change and use "full disk" encryption.
I created a small unencrypted partition for
/boot and an big encrypted LUKS partition where I used LVM to create 5 logical volumes in a volume group:
- One to install Fedora (
- One for swap (
- One for another Linux OS (
- And two for data (
I installed Fedora in
lv_fedora as my first OS without any trouble and I am able to boot it from GRUB's menu, but now I don't know how could I install another Linux based OS (Linux Mint 17) in the encrypted disk and make Fedora's GRUB2 detect it and boot this OS as well.
I have tried two different approaches. in both cases I started
ubiquity, the Linux Mint installer, with the
--no-bootloader option, to prevent Mint from installing the bootloader. And in both cases, in order to start installation, I have previously unlocked the LUKS partition from the LinuxMint Live image's file manager to be able to select the corresponding
lv_os2 logic volume as installation target. Now:
- First I tried to install Linux Mint in a single partition assigned to
lv_os2. The installation was successful. From Fedora, I executed
grub2-mkconfig -o /boot/grub/grub.cfgto update the GRUB entries (that's what I have been doing all my life when using non-encrypted disk). GRUB detected Linux Mint was present and added the corresponding entries to the boot menu. The problem was that I was not able to boot from those entries afterwards.
- Then I thought maybe  it was due to the kernel images being encrypted in the
bootfolder in Linux Mint's partition. Maybe GRUB 2 needed those files to be in an unencrypted partition, just as when I first installed Fedora (I used a
/bootunencrypted partition simply because it was the recommended setup). So this time I backed up Fedora's
/bootpartition (just in case) and reinstalled Linux Mint, but making it use the unencrypted partition as
/boottoo, so that the kernel images could be copied into that directory and, maybe, booted after installation. The installation was successful and the "extra" files added in
/bootby Linux Mint did not override any of the Fedora files, so at least Fedora was working and I didn't have to use the
/bootbakcup. I then started Fedora and executed
grub2-mkconfig -o /boot/grub/grub.cfgagain. This time it was even worse. GRUB mixed up entries creating, for example, an entry for Fedora (targeting
lv_fedora) loading a Linux Mint's kernel image. I tried to manually modify those entries, but unsuccessfully.
I bet I am doing something wrong. Is there a better way to install a secondary Linux OS into an already encrypted volume and let the primary Linux OS handle the boot loader? (updating its GRUB entries to allow booting from the secondary OS as well)
: as you can see, I'm just trying and learning, but I don't have a deep understanding on the subject.