[Solved] LVM2/LUKS Encrypted?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Arokha

[Solved] LVM2/LUKS Encrypted?

Post by Arokha »

Previously I had a 64gb USB drive partitioned thus (we'll call it sda):
sda1 - NTFS 32gb
sda2 - ext4 2gb (GRUB2)
sda3 - LUKS encrypted 30gb (LVM2 PV, with below VG on it)

LVM2 VG: vglinux
LVM2 LV: vglinux-root (ext4, root of a Fedora system)
LVM2 LV: vglinux-swap (swap space)


Somewhere along the way I decided to switch to Linux Mint, and would like to install that in-place of the existing Fedora system. I noticed that Ubiquity does not support LVM2 manual setups like Anaconda (Fedora installer) does, and I've seen there's already a bug report/feature request about this. I decided to just keep the existing vglinux-root and sda2 partitions from the Fedora install and tell Ubiquity to format them, which it happily did. The system is unbootable though, as I believe Ubiquity didn't "realize" the sda3 partition was encrypted, and set it up appropriately in GRUB or somehwere.

So I compared the grub.cfg of an encrypted Linux Mint install (using just the two checkboxes in the installer to install LVM and LUKS) to my install's grub.cfg. No difference (other than the UUIDs).

What would have been left out that this will not boot? The encrypted "default" (two checkboxes in Ubiquity) prompts for a password when reaching the splash screen. The "reinstall" atop existing LVM2 config just drops me to an emergency shell. Is there something different in the initramfs between the two? I'm not familiar enough with how it works to know what to compare.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Arokha

Re: [Solved] LVM2/LUKS Encrypted?

Post by Arokha »

Fixed this. If you install in an existing encrypted partition (LVM or not), it does not add it to /etc/crypttab which appears to be sort of like fstab but for encrypted partitions. It's included in the initramfs when it's built, so I added a line to that file pointing to the partition to decrypt, rebuilt initramfs, and it works (prompts for password, boots normally).
Locked

Return to “Installation & Boot”