How to auto mount Luks encrypted partition at boot in Fedora 22
Partition format :
| Hard drive (/dev/sda) |
| /boot | Encrypted Volume |
|/dev/sda1 | /dev/sda2 |
| | LVM (root,home) |
Here is my fstab :
/dev/mapper/fedora21-root / ext4 defaults,x-systemd.device-timeout=0 1 1
UUID=<uuid> /boot ext4 defaults 1 2
Here is my /ect/crypttab :
luks UUID=<luks uuid> /boot/key_luks luks
I have added the key (/boot/key_luks) in one of the key slot of Luks
However while boot it is asking for password, is there a guide to properly automount a Lulks partition ? When only encrypted volume is /boot ?
JFYI : Added the key using following command :
#dd if=/dev/urandom of=/boot/key_luks bs=1024 count=4
#cryptsetup luksAddKey /dev/sda2 /boot/key_luks
Edit: Also rebuilt the initramfs and checked the changes were reflected in the initramfs. However It is still asking for password!
What's the point? If your encrypted partitions automatically mount, then the encryption isn't providing any security.
To auto mount LUKS encrypted partition I suppose you need to add the entry(mount device and mount point) in /etc/crypttab file.
Thanks for the reply. @randomuser : True. The next plan is putting it(the kery file) in a USB and if the USB is mounted then only it will work. However atleast it should work as per "man 5 crypttab"
@krishnayeddula : I have already edited /etc/crypttab and made sure changes were populated in initramfs