Go to ...

Techpository

A Better Technical Repository

RSS Feed

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.

  1. In the Unity dash type “disks” and hit enter.
  2. Below “Devices” click on the hard drive you want to encrypt.
  3. Below “Volumes” click on the cog/more actions button.
  4. Click “Format Volume”. For type, choose “Encrypted, compatible with Linux systems.” Name your drive and give it a strong pass phrase.
  5. Click “Format”

 

Part 2: Automatically mount the HDD on system start-up.

  1. Keep the “Disks” application open, and click on the cog.
  2. Click “Edit Encryption Options.”
  3. “Automatic Encryption Options” will be turned on, and the menu below greyed out. Turn automatic encryption options off.
  4. 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.

By: Tryion

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