On Sat, Jul 4, 2020, at 04:23, Dale wrote:
>  Now that I have a spare drive, I want to encrypt it and have a mount point 
> for it, /home/dale/documents for example. What I'd like to do, when I login 
> in, it asks me for the encryption password and then mounts it. When I log 
> out, it reverses. I'm not doing all of /home because I want to separate some 
> info. I may do it later. 

I would use LUKS (warning: all data on the spare drive will be lost):
0. Partition the spare drive: parted /dev/sdx
1. Format the drive's partition with LUKS: cryptsetup luksFormat /dev/sdxn
2. Decrypt the LUKS partition: cryptsetup luksOpen /dev/sdxn documents
3. Create a filesystem on the decrypted partition: mke2fs -t ext4 -m 0 
/dev/mapper/documents
4. Add the new filesystem to /etc/fstab (use the UUID for easier matching)
5. Mount the filesystem: mount /home/dale/documents

In order to close the filesystem, you need the following steps:
1. Unmount the filesystem: umount /home/dale/documents
2. Lock the LUKS partition: cryptsetup luksClose documents

Since you use KDE you may try Vault instead, but I haven't tested that 
personally.

-- 
https://fturco.net/

Reply via email to