use mount with LUKS2
Back in times of LUKS1, it was possible to use a command like
$ mount /dev/luks-encrypted-partition /mnt/a
[enter passphrase upon being prompted]
as a shortcut for
$ cryptsetup luksOpen /dev/luks-encrypted-partition some-name
$ mount /dev/mapper/some-name /mnt/a
But since LUKS2 this ability is lost. Directly trying to mount a LUKS2 encrypted partition results in the following error message:
$ mount /dev/luks-encrypted-partition /mnt/a
mount: /mnt/a: unknown filesystem type 'crypto_LUKS'.
Does anyone know how I can get back to the old functionality? I am using an up-to-date Arch Linux system.
Automatic mounting of encrypted partition is possible by helper program mount.crypt, which is part of libpam_mount_bin package. The support for LUKS2 in libpam_mount was introduced in version libpam-mount-2.16-5ubuntu0.1 in 2019 (see https://bugs.launchpad.net/ubuntu/+source/libpam-mount/+bug/1804408 ).
So, the error you encounter is not due to lack of LUKS2 support. I had similar problem after upgrade of (K)ubuntu 18.04 to 20.04 probably because helper program mount.crypt and symlinks mount.crypt_LUKS and mount.crypto_LUKS are now part of libpam-mount-bin package and not libpam-mount, and this package was not installed during upgrade. The hint about package change comes from https://forums.linuxmint.com/viewtopic.php?t=324991 .
Check if you have the mount helper program installed.