I'm trying to install arch using newest iso image (2012.10.06) in a following manner:
gpt partition on /dev/sda1
root on btrfs on /dev/sda2
var on btrfs on /dev/sda3
home on btrfs on /dev/mapper/crypt (LUKS) on /dev/sda4,
but I have a problem after booting into freshly installed system. There's a message stating that:
ERROR: Failed to open encryption mapping: The device /dev/sda2 is not a LUKS volume and the crypto= parameter was not specified.
(actually there's uuid instead of /dev/sda2 but I've changed it for brevity)
Then after some time I get an error:
[ TIME ] Timed out waiting for device dev-mapper-crypt.device
then some "dependency failed" messages and I get welcomed to the emergency mode prompt.
I've added encrypt before filesystems to mkinitcpio hooks, and rebuild the image.
My /etc/fstab is generated by genfstab at installation and looks like this (comments ommited):
/dev/sda2 / btrfs rw,noatime,compress=lzo,space_cache,subvol=/__active 0 0 /dev/mapper/crypt /home btrfs rw,noatime,compress=lzo,space_cache,subvol=/__active 0 0 /dev/sda3 /var btrfs rw,noatime,compress=lzo,space_cache,subvol=/__active 0 0
Problem is that my / is NOT encrypted, only my home partition. But when I remove my home partition entry from fstab system boots to normal login prompt (but the error saying / is not a LUKS partition still shows up).
What am I doing wrong? I didn't alter my grub.cfg after running grub-mkconfig, and there are no entries in it stating that root is encrypted (only flags are: subvol=__active). How can I prompt the user (me) for passphrase on boot? As far as I read it should be done automatically by "encrypt" hook.
Last edited by kajman (2012-10-18 08:45:05)
What are the boot parameters in grub?
You need a cryptdevice= entry if you want to unlock it from the initramfs.
For the syntax read the help of the encrypt hook:
mkinitcpio -H encrypt
If it's only for the home partition, I would unlock it from /etc/crypttab instead of the initramfs.
Thank you very much, using crypttab and getting rid of encrypt hook worked like a charm!