From 884ba3d82d242ffc928e538ca6dfa2163280f9c2 Mon Sep 17 00:00:00 2001 From: Yiyang Kang Date: Fri, 7 Oct 2022 02:25:07 +0800 Subject: [PATCH] docs: update readme --- README.md | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c7f25b0..ae83ef8 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,11 @@ A tool for mounting encrypted partitions. ## Use case -I have encrypted partitions that I need to mount them from time to time. +I have encrypted partitions that I need to mount and unmount from time to time. -I use GPG to encrypt the decryption keys for each partition, save them as `${uuid}.key` +I use GPG to encrypt the keys for each partition, save them as `${uuid}.key` -With this tool, I can mount and unmount them with one command. +With this tool, I can mount and unmount these partitions with one command. ## Usage @@ -22,12 +22,19 @@ path: /dev/nvme0n1p2 mountpoint: /boot ``` -Then when you run `xmnt boot`, the tool will decrypt `/dev/nvme0n1p2` and mount it on `/boot`. +Then when you run `xmnt boot`, the tool will look for encryption key according +to the UUID of `/dev/nvme0n1p2`, read the key, call `gpg --decrypt` to decrypt +the key when necessary, then use the key to open `/dev/nvme0n1p2`, and mount it +on `/boot`. + +Directories for storing encryption keys are defined in +`$XDG_CONFIG_HOME/xmnt/xmnt.yml`. The tool will recursively search these +directories for keys. You can also use it without defining presets. See `--help` for detailed usage. ## Supported partition types -- luks encrypted partitions (e.g. ext4) +- luks encrypted partitions (e.g. ext4). "plain" format is not supported. - regular unencrypted partitions - zfs datasets