How do I automount a LUKS encrypted partition in a secure way? Ideally either when I log on (and therefore my password in at the log in screen), or once I get to desktop have Ubuntu ask for my password and then auto mount the partition?
The contents of my fdisk is below
The encrypted partition is /dev/sdb7, my root and home partition is /dev/sdb5 (which isn't encrypted).
Disk /dev/loop0: 14 MiB, 14647296 bytes, 28608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 81.7 MiB, 85692416 bytes, 167368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x0006d9d9
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 524646399 524644352 250.2G 7 HPFS/NTFS/exFAT
/dev/sda2 * 524646400 1953523711 1428877312 681.4G 83 Linux
Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x1ffae910
Device Boot Start End Sectors Size Id Type
/dev/sdb1 214892542 976773119 761880578 363.3G 5 Extended
/dev/sdb2 * 2048 2150399 2148352 1G 83 Linux
/dev/sdb5 214892544 257558559 42666016 20.4G 83 Linux
/dev/sdb6 300716032 318294015 17577984 8.4G 82 Linux swap / Solaris
/dev/sdb7 318296064 976773119 658477056 314G 83 Linux
Partition table entries are not in disk order.