Ubuntu: Autologin to an encrypted drive on startup
Make certain that you understand the security implications of using auto login on an encrypted drive.
Part 1: Encrypt the secondary drive.
- In the Unity dash type “disks” and hit enter.
- Below “Devices” click on the hard drive you want to encrypt.
- Below “Volumes” click on the cog/more actions button.
- Click “Format Volume”. For type, choose “Encrypted, compatible with Linux systems.” Name your drive and give it a strong pass phrase.
- Click “Format”
Part 2: Automatically mount the HDD on system start-up.
- Keep the “Disks” application open, and click on the cog.
- Click “Edit Encryption Options.”
- “Automatic Encryption Options” will be turned on, and the menu below greyed out. Turn automatic encryption options off.
- Enter the pass phrase from when you formatted the disk. Click “Ok”.
You now have an encrypted hard drive that will automatically login when your computer boots.
Automount your encrypted drive:
If you want to have your encrypted volume automount you can do the following:
1. Create a directory on your drive that you want to mount: mkdir /media/datavolume
2. Type: cat /etc/crypttab
2. Look for the LUKS UUID. eg: luks-3d22f21c-22bc-2bb4-7be3-2bc1121a02d73
3. Using your newly discovered encrypted volume ID, add the following to your fstab file:
4. /dev/mapper/luks-3d22f21c-22bc-2bb4-7be3-2bc1121a02d73 /media/datavolume ext4 defaults 0 2
By: Timothy Conrad