[Solved] LVM2/LUKS Encrypted?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

[Solved] LVM2/LUKS Encrypted?

Postby Arokha on Fri Mar 01, 2013 3:21 pm

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.
Arokha
Level 1
Level 1
 
Posts: 2
Joined: Fri Mar 01, 2013 3:12 pm

Linux Mint is funded by ads and donations.
 

Re: [Solved] LVM2/LUKS Encrypted?

Postby Arokha on Tue Mar 05, 2013 2:33 pm

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).
Arokha
Level 1
Level 1
 
Posts: 2
Joined: Fri Mar 01, 2013 3:12 pm


Return to Installation & Boot

Who is online

Users browsing this forum: Fred Barclay, gold_finger, r00t, WinterTroubles and 29 guests