0

I followed my own instructions here to shrink down a LUKS-encrypted Ubuntu 20.04 partition and its inner LVM volume so I could install Ubuntu 22.04 in a new LUKS-encrypted partition next to it, but after installing the LUKS-encrypted Ubuntu 22.04 OS, the LUKS-encrypted 20.04 installation (in a separate encrypted partition) is no longer in the Grub boot menu. Why? How do I get this dual boot to work properly? Should I have put both OS's in the same LUKS-encrypted partition, just in different LVM volumes within that partition?

Here's my disk, as shown in gparted while logged into the new Ubuntu 22.04 OS.

Description:

  1. /dev/nvme0n1p1 is the 512 MiB EFI partition
  2. /dev/nvme0n1p2 is the ext4 /boot non-encrypted partition for the old Ubuntu 20.04 OS
  3. /dev/nvme0n1p3 is the LUKS-encrypted partition containing a single LVM volume with Ubuntu 20.04 in it (no longer in the grub menu)
  4. /dev/nvme0n1p4 is the ext4 /boot non-encrypted partition for the new Ubuntu 22.04 OS
  5. /dev/nvme0n1p5 is the LUKS-encrypted partition containing a single LVM volume with Ubuntu 22.04 in it (is in the grub menu, and is the OS running right now)

enter image description here

These look potentially useful:

  1. Ask Ubuntu: How can I install Ubuntu encrypted with LUKS with dual-boot?
  2. Ask Ubuntu: how do I boot into a LUKS-encrypted environment? - helps me clearly see the definitions of LUKS-partition vs LVM vs logical volumes within it

1 Answers1

0

I figured it out!

How to add other LUKS-encrypted Linux distributions back to your Grub bootloader startup menu: quick summary

# 1. Open your `/etc/default/grub` file.
sudo gedit /etc/default/grub
# Then manually add these lines to the bottom of that file:
# (required)
GRUB_DISABLE_OS_PROBER=false
# (optional)
GRUB_ENABLE_CRYPTODISK=y

2. Unlock your LUKS-encrypted partitions which contain other bootable

operating systems. In my case:

sudo cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3_crypt

3. Update your Grub bootloader in your /boot partition.

sudo update-grub

When I run update-grub, my output now includes this line:

Found Ubuntu 20.04.5 LTS (20.04) on /dev/mapper/system-root

4. Done. Reboot to see and use the new Grub entries!

reboot

For a ton more details and information, see my much longer answer here: Ask Ubuntu: How to get old LUKS-encrypted Ubuntu version back into Grub menu after installing new Ubuntu version in new LUKS partition