I have been given a task to creat a LUKS encrypted partition and then mount it, here are the steps I followed:
Create the partition for encryption:
sudo fdisk /dev/sdaReboot
Format the partition with cryptsetup:
sudo cryptsetup luksFormat /dev/sda3Open encrypted partition:
sudo cryptsetup luksOpen /dev/sda3 secret-diskAdd the following to
/etc/crypttab:secret-disk /dev/sda3Make filesystem on partition:
sudo mkfs -t ext3 /dev/mapper/secret-diskMake mount directory:
sudo mkdir /secretAdd the following to
/etc/fstab:/dev/mapper/secret-disk /secret ext4 defaults 1 2Mount partition at /secret:
sudo mount /secret OR sudo mount -aReboot.
Problem: During reboot, the mount instruction in fstab returns the error : device not ready or not present. And I have to enter S to skip the mount so ubuntu can boot or M to recover it manually. I have checked this option but it does not solve mine. How do I get the encrypted partition to mount at /secret.