December 2018
Beginner
826 pages
22h 54m
English
By default, if you try to mount a filesystem on an encrypted drive, without knowing or caring that it's LUKS encrypted, you'll get a descriptive message that should give you a hint:
$ sudo mount /dev/sdb1 /optmount: unknown filesystem type 'crypto_LUKS'
At this point, you know you need to run luksOpen on the drive first, and you might find that you've long since forgotten the password and the data on the disk has effectively gone to silicon-heaven (or silicon-purgatory).
In this section, we mounted our drive using a keyfile on the root partition; if instead you add a line with none in it to crypttab and then add the entry to fstab, you will get prompted for a password at boot:
$ echo "encrypted-opt /dev/sdb1 none" | sudo tee ...