pmt-ehd(8)

πŸ“¦
version 2.23 Β· 2 versions
  • 2.23 Β· alpine 3.24, arch rolling, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.18 Β· ubuntu jammy
, in alpine 3.24, arch rolling, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– pmt-ehd β€” the pmt-ehd(8) era πŸ’–

okay bestie, sit down, we're making an encrypted disk image and it's gonna be so cute. this is a page from the pam_mount</> manual set, and it's about to be your new fave 🫢


✨ Name ✨

pmt-ehd β€” create an encrypted disk image πŸ”πŸ’…


✨ Syntax ✨

pmt-ehd [-DFx] [-c fscipher] [-h hash] [-k fscipher_keybits] [-t fstype]
[-H header_path] -f container_path -s size_in_mb

✨ Options ✨

so here's the tea β˜•: any mandatory option you forget? it gets asked interactively. but if stdin is not a terminal, pmt-ehd just dips and exits. no vibes, no questions. 😭

  • -D β€” turn on debugging strings. lil peek behind the curtain for when you need to see what's actually going on πŸ”
  • -F β€” force an operation that would otherwise hit you with an interactive confirmation. and like, you can stack multiple -Fs to apply more force πŸ’ͺ (yes, that's real, more -F = more force)
  • -c cipher β€” the cipher for the filesystem, bestie. this takes any value cryptsetup(8) recognizes, usually shaped like "cipher-mode[-extras]". the recommended ones are aes-cbc-essiv:sha256 (this is the default ✨) or aes-xts-essiv:sha256.
  • -f path β€” store the new disk image at path. if that file already exists, pmt-ehd will prompt before overwriting, unless you gave it -F. and if path is a symlink? it gets even more cautious πŸ‘€ act accordingly.
  • -H path β€” store a detached (separate) metadata file with a new LUKS header at path. same deal: if the file exists it prompts before overwriting unless -F is given, and a symlink makes it extra cautious again. default is to not use a detached header. this one correlates with the cryptsetup --header option πŸ”—
  • -h hash β€” the message digest/hash used for key derivation in the PBKDF2 stage. default is sha512.
  • -i cipher β€” (this option had been removed in pam_mount/pmt_ehd 2.11.) rip bozo πŸ’€
  • -k keybits β€” the keysize for the cipher you picked with -c. some ciphers support multiple keysizes β€” AES for example comes in at least the keysizes 192 and 256. defaults to 256 (to match aes-cbc-essiv). and note this, it's a whole thing: XTS uses two keys, but they're drawn from the same key material, so aes-cbc-256 is equivalent to aes-xts-512, and aes-cbc-128 is to aes-xts-256. math ate πŸ’…
  • -p path β€” (this option had been removed in pam_mount/pmt_ehd 2.11.) also rip πŸ’€
  • -s size β€” the initial size of the encrypted filesystem, in megabytes. heads up: this option is ignored when the filesystem is created on a block device. πŸ“
  • -t fstype β€” the filesystem to use for the encrypted filesystem. defaults to xfs. πŸ—‚οΈ
  • -u user β€” give the container and fskey files to user. why? because the program is usually run as root, and without this the files would otherwise keep root ownership. sharing is caring 🫢
  • -x β€” do not initialize the container with random bytes. ⚠️ this may impact secrecy. like, actually. be careful.

✨ Description ✨

pmt-ehd can be used to create a new encrypted container, and it replaces the previous mkehd script as well as any HOWTOs that explain how to do it manually. so iconic of it, honestly πŸ‘‘

without any arguments, pmt-ehd will interactively ask for all missing parameters. no thoughts, just questions πŸŽ€

to create a container with a size of 256 MB, use:

pmt-ehd -f /home/user.cont -s 256

and that's the whole page, bestie πŸ¦‹ this one's from the pam_mount</> fam, dated 2011-Aug-05 β€” yeah she's a vintage queen and she still slays βœ¨πŸ’– periodt.

πŸ“¦ where this page comes from