Skip to Content
Linux Administration Cookbook
book

Linux Administration Cookbook

by Adam K. Dean
December 2018
Beginner
826 pages
22h 54m
English
Packt Publishing
Content preview from Linux Administration Cookbook

There's more...

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Administration

Mastering Linux Administration

Alexandru Calcatinge, Julian Balog

Publisher Resources

ISBN: 9781789342529Supplemental Content