mount / unmount encrypted partitions.
Go to file
Yiyang Kang 98a01c5f36
build: update dependencies
2023-03-04 13:12:00 +08:00
blk feat: support blk UUID in preset 2023-03-04 13:10:57 +08:00
cfg feat: xmnt 2022-10-07 01:19:04 +08:00
mnt feat: support blk UUID in preset 2023-03-04 13:10:57 +08:00
msg feat: xmnt 2022-10-07 01:19:04 +08:00
util fix: lint issues 2022-10-07 02:09:37 +08:00
zfs fix: lint issues 2022-10-07 02:09:37 +08:00
.gitignore feat: xmnt 2022-10-07 01:19:04 +08:00
Makefile build: add lint target 2023-03-04 13:09:51 +08:00
README.md docs: update readme 2022-10-07 03:55:10 +08:00
go.mod build: update dependencies 2023-03-04 13:12:00 +08:00
go.sum build: update dependencies 2023-03-04 13:12:00 +08:00
main.go fix: lint issues 2022-10-07 02:09:37 +08:00
mounters.go feat: xmnt 2022-10-07 01:19:04 +08:00

README.md

xMnt

A tool for mounting encrypted partitions.

Use case

I have encrypted partitions that I need to mount and unmount from time to time.

I use GPG to encrypt the keys for each partition, save them as ${uuid}.key

With xmnt, I can mount and unmount these partitions with one command.

Usage

Presets are stored in $XDG_CONFIG_HOME/xmnt/presets.

For example, save the following content as boot.yml in the presets directory:

type: blk
path: /dev/nvme0n1p2
mountpoint: /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. xmnt 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 "plain" format is not supported.
  • regular unencrypted partitions
  • zfs datasets (keylocation=prompt)