How To Mount A Crypt Disk In /etc/crypttab
July 10, 2013
Posted by on
I have a /etc/crypttab like the following:
md0_crypt UUID=17f25217-6080-47f5-b6ce-63537f1fb165 none luks
md1_crypt UUID=c5585594-cc7b-41c2-bd5a-349205617a27 none luks
sdb4_crypt UUID=f656f25c-3fa3-4349-9175-c3f129b64589 none luks,swap
sdc4_crypt UUID=5cafe87d-6745-4cd1-bada-8c912663282b none luks,swap
Now I want to “mount” md1_crypt which didn’t mount at boot time due to RAID problems – and I’ve finally successfully restored the RAID1 array /dev/md1.
The command I used to mount the encrypted disk was:
cryptsetup luksOpen /dev/disk/by-uuid/c5585594-cc7b-41c2-bd5a-349205617a27 md1_crypt
In other words: cryptsetup luksOpen /dev/disk/by-uuid/[UUID] [mount_name]
I was asked for my password.
Then I entered the command:
…to mount the decrypted disk to the file system from the pre-configured /etc/fstab.