mount.crypt(8)
β¨ NAME β¨
okay so bestie, say hi to mount.crypt β she mounts a dm-crypt encrypted volume for you π (this one lives in the pam_mount manual, section 8, iykyk)
π SYNTAX π
literally just:
mount.crypt [-nrv] [-o options] device directory
device, then directory. that's the whole vibe. no cap. π¦
π OPTIONS π
-ooptions β pass extra mount options through here.mount.cryptis gonna swipe out the options that are hers, then hand the leftovers straight to the underlying mount program. all the possible ones are down below, keep scrolling bestie π-nβ do NOT update/etc/mtab. and like, be aware of the consequence: once you do this you can't unmount the volume by naming the container anymore β you have to pass the mountpoint toumount.cryptinstead. it's giving commitment issues fr fr π-rβ sets up the loop device (if it's needed) and the crypto device in read-only mode. and yeah, the mount itself is necessarily read-only too, that's just how it goes. heads up though: doing a remount with`mount /mnt -o remount,rw`will NOT make the mount read-write. you'd have to disassociate the crypto and loop devices first. no shortcuts, periodt π-vβ turn on debugging and be a bit more verbose. she's yapping, and honestly? we love that for her πΈ
π MOUNT OPTIONS π
headerβ a detached (aka separated) metadata file where the LUKS header is stored. it correlates with the`cryptsetup --header`option. if you omit it, the detached LUKS header feature just isn't used. simple as that πallow_discardβ enables discard passthrough support. ok important: this does not cause the filesystem to be mounted with discard enabled β it just allowsfstrimto be run manually. she's granting permission, not doing the thing π«Άno_read_workqueueβ bypass the internal workqueue and process read requests synchronously. efficient queen πno_write_workqueueβ bypass the internal workqueue and process write requests synchronously. matching set, iconic β¨cipherβ the cryptsetup cipher used for the encrypted volume. this one is mandatory for PLAIN (non-LUKS) volumes, so don't skip it. also fun fact:pmt-ehd(8)defaults to creating volumes with"aes-cbc-essiv:sha256"as a cipher πcrypto_nameβ pick the name for the crypto device (optional). rn this option is only usable with dm-crypt systems π«fsckβ runfsckon the container before mounting it. self-care check-up before the big event πfsk_cipherβ the OpenSSL cipher used for the filesystem key. there's a special keyword,"none", that bypasses decryption and passes the file contents directly to libcryptsetup. sneaky but valid π§fsk_hashβ the OpenSSL hash used for producing key and IV. πfstypeβ the exact type of filesystem inside the encrypted container. the default is to just let the kernel autodetect. trust the process πΈhashβ the cryptsetup hash used for the encrypted volume. this defaults to no hashing, because pam_mount assumes EHD volumes with strong and simple fskey generation. periodt πkeyfileβ the path to the key file. this option is mandatory for"normal"crypto volumes and should not be used for LUKS volumes. read that twice bestie πremountβ causes the filesystem to be remounted with new options. now listen, this one's got lore:mount.cryptcannot switch the underlying loop device (if it applies) or the crypto device between read-only and read-write once it's been created. only the actual filesystem mount can be changed, and even then, with limits. if the loop device is read-only, the crypto device will be read-only, and changing the mount to read-write is impossible. similarly, going from rw to ro will only mark the mount read-only, but not the crypto or loop device β which makes it impossible to set the filesystem the crypto container is located on to read-only. yeah. it's a whole thing. plan accordingly πroβ same as the-roption. twins π―verboseβ same as the-voption. also twins π
π°οΈ OBSOLETE MOUNT OPTIONS π°οΈ
this section is provided for reference, so like, historical archive vibes ποΈ
loopβ this option used to set up a loop device, back whencryptsetup(8)expected a block device. it's ignored now, becausemount.cryptcan figure this out on her own. she's grown π β¨
and that's the whole page bestie!! this one came from the pam_mount crew, dated 2011-12-15 β yes she's an elder but she still ate, and honestly? iconic behavior. go mount something encrypted, love u, bye π«Άππ
π¦ 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