pmt-ehd(8)
π 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)-ccipher β the cipher for the filesystem, bestie. this takes any valuecryptsetup(8)recognizes, usually shaped like"cipher-mode[-extras]". the recommended ones areaes-cbc-essiv:sha256(this is the default β¨) oraes-xts-essiv:sha256.-fpath β store the new disk image at path. if that file already exists,pmt-ehdwill prompt before overwriting, unless you gave it-F. and if path is a symlink? it gets even more cautious π act accordingly.-Hpath β store a detached (separate) metadata file with a new LUKS header at path. same deal: if the file exists it prompts before overwriting unless-Fis given, and a symlink makes it extra cautious again. default is to not use a detached header. this one correlates with thecryptsetup --headeroption π-hhash β the message digest/hash used for key derivation in the PBKDF2 stage. default issha512.-icipher β (this option had been removed in pam_mount/pmt_ehd 2.11.) rip bozo π-kkeybits β the keysize for the cipher you picked with-c. some ciphers support multiple keysizes β AES for example comes in at least the keysizes192and256. defaults to256(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, soaes-cbc-256is equivalent toaes-xts-512, andaes-cbc-128is toaes-xts-256. math ate π-ppath β (this option had been removed in pam_mount/pmt_ehd 2.11.) also rip π-ssize β the initial size of the encrypted filesystem, in megabytes. heads up: this option is ignored when the filesystem is created on a block device. π-tfstype β the filesystem to use for the encrypted filesystem. defaults toxfs. ποΈ-uuser β 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
- alpine 3.24: pam_mount-doc 2.22-r2 Β· LGPL-2.1-or-later
- arch rolling: pam_mount 2.23-1 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- debian bookworm: libpam-mount-bin 2.19-1 Β· LGPL-2.1-or-later
- debian trixie: libpam-mount-bin 2.20-3+b2 Β· LGPL-2.1-or-later
- fedora 43: pam_mount 2.20-4.fc43 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- fedora 44: pam_mount 2.20-5.fc44 Β· LGPL-2.1-or-later AND GPL-2.0-or-later
- nixos 26.05: pam_mount 2.22
- nixpkgs unstable: pam_mount 2.22
- opensuse-leap 16.0: pam_mount 2.20-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pam_mount 2.20-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pam_mount 2.20-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- opensuse-leap 16.0: pam_mount 2.20-bp160.1.13 Β· GPL-2.0-or-later AND LGPL-2.1-or-later
- ubuntu noble: libpam-mount-bin 2.20-3build2 Β· LGPL-2.1-or-later
- ubuntu questing: libpam-mount-bin 2.20-3build4
- ubuntu resolute: libpam-mount-bin 2.22-2 Β· LGPL-2.1-or-later
- ubuntu stonking: libpam-mount-bin 2.22-3build1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms