[arch-general] Initramfs doesn't ask for password to encrypted LVM
I guess it's trivial to fix, I usually overlook basic things... I installed Arch on encrypted LVM without issues, but for some reason initramfs doesn't ask for password to encrypted LVM and waits for root device instead. I'm not sure where the problem lies -- configuration files[1] seem correct to me. Any ideas? [1] https://paste.xinu.at/pbiA78/ -- Bartłomiej Piotrowski http://bpiotrowski.pl/
Hi, On Wed, Aug 28, 2013 at 10:47 AM, Bartłomiej Piotrowski <b@bpiotrowski.pl>wrote:
I installed Arch on encrypted LVM without issues, but for some reason initramfs doesn't ask for password to encrypted LVM and waits for root device instead.
Without further investigation, I'm not sure what the options line does, and if the order (it's last) is ok), I pass these options on the linux line, you could try it: linux /vmlinuz-linux cryptdevice=/dev/sda2:root root=/dev/mapper/hdd-root rw
-- Bartłomiej Piotrowski http://bpiotrowski.pl/
-- Marek Otahal :o)
I guess it's trivial to fix, I usually overlook basic things...
I installed Arch on encrypted LVM without issues, but for some reason initramfs doesn't ask for password to encrypted LVM and waits for root device instead. I'm not sure where the problem lies -- configuration files[1] seem correct to me. First, your HOOKS array should have lvm2 before encrypt so that the initramfs can setup the root volume before it tries decrypting it. IE: HOOKS="base udev autodetect modconf block keymap lvm2 encrypt filesystems keyboard fsck systemd" Second, you have to tell the initramfs which lvm volume group and which volume of that volume group your root volume is. Your options array should be:
On 28/08/13 at 10:47, Bartłomiej Piotrowski wrote: options cryptdevice=/dev/LVMVOLUMEGROUP/LVMROOTVOLUME:root root=/dev/mapper/root rw where LVMVOLUMEGROUP is the group your root volume is a part of and LVMROOTVOLUME is your root logical volume. Also, since the encrypt hook mounts the LVMROOTVOLUME as /dev/mapper/root due to :root you have to change the root= to /dev/mapper/root. To summarize, your hooks array was incorrectly sorted, and your options array didn't take the lvm into account nor the fact that encrypt mounts the cryptdevice as root not hdd-root. -- Simon Thelen
On 08/28/13 at 05:30pm, Simon Thelen wrote:
On 28/08/13 at 10:47, Bartłomiej Piotrowski wrote:
I guess it's trivial to fix, I usually overlook basic things...
I installed Arch on encrypted LVM without issues, but for some reason initramfs doesn't ask for password to encrypted LVM and waits for root device instead. I'm not sure where the problem lies -- configuration files[1] seem correct to me. First, your HOOKS array should have lvm2 before encrypt so that the initramfs can setup the root volume before it tries decrypting it. IE: HOOKS="base udev autodetect modconf block keymap lvm2 encrypt filesystems keyboard fsck systemd"
This used to be the case. But now the LVM2 is assembled via udev, so it does not matter where in the order the lvm2 hook resides. -- Curtis Shimamoto sugar.and.scruffy [at] gmail.com
On Wed, 28 Aug 2013 10:47:21 +0200 Bartłomiej Piotrowski <b@bpiotrowski.pl> wrote:
I guess it's trivial to fix, I usually overlook basic things...
I installed Arch on encrypted LVM without issues, but for some reason initramfs doesn't ask for password to encrypted LVM and waits for root device instead. I'm not sure where the problem lies -- configuration files[1] seem correct to me.
Any ideas?
In the cryptdevice line, try replacing "root" with "lvm" (that's your PV name, right?), so you'll have "cryptdevice=/dev/sda2:lvm". Cheers, -- Leonid Isaev GnuPG key: 0x164B5A6D Fingerprint: C0DF 20D0 C075 C3F1 E1BE 775A A7AE F6CB 164B 5A6D
participants (5)
-
Bartłomiej Piotrowski
-
Curtis Shimamoto
-
Leonid Isaev
-
Marek Otahal
-
Simon Thelen