[arch-general] Initramfs doesn't ask for password to encrypted LVM

Simon Thelen archmailing5 at gmail.com
Wed Aug 28 11:30:35 EDT 2013


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"
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:
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20130828/269dbc29/attachment.asc>


More information about the arch-general mailing list