From: "Francesco Turco" <mail@fturco.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Encrypted drive setup at login and locking on logout.
Date: Sat, 04 Jul 2020 05:49:07 +0200 [thread overview]
Message-ID: <3897a509-65e9-4040-920c-524793b1c697@www.fastmail.com> (raw)
In-Reply-To: <e8285ae9-3c8f-c625-30a0-c56c51258b90@gmail.com>
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/
next prev parent reply other threads:[~2020-07-04 3:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-04 2:23 [gentoo-user] Encrypted drive setup at login and locking on logout Dale
2020-07-04 3:49 ` Francesco Turco [this message]
2020-07-04 13:01 ` Michael
2020-07-06 4:49 ` Dale
2020-07-06 5:24 ` William Kenworthy
2020-07-06 6:37 ` Dale
2020-07-06 9:05 ` William Kenworthy
2020-07-06 9:46 ` Dale
2020-07-06 10:17 ` Neil Bothwick
2020-07-06 11:02 ` Rich Freeman
2020-07-06 8:21 ` Neil Bothwick
2020-07-06 9:53 ` Dale
2020-07-06 10:19 ` Neil Bothwick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3897a509-65e9-4040-920c-524793b1c697@www.fastmail.com \
--to=mail@fturco.net \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox