I am creating a mapper file /dev/mapper/luks-672dcc74-d002-47dc-b61b-525baf91dc7c on boot in /etc/crypttab like this:
luks-672dcc74-d002-47dc-b61b-525baf91dc7c UUID=672dcc74-d002-47dc-b61b-525baf91dc7c /home/user1/keyfile_sandisk120gb luks,keyscript=/bin/cat
Output of lsblk is this:
sdd 8:48 1 114,6G 0 disk └─luks-672dcc74-d002-47dc-b61b-525baf91dc7c 253:2 0 114,6G 0 crypt
Then when I run my backup script I use pmount like this:
But I get:
Error: device /dev/dm-2 is not removable
This normally mounts the ext4 partition to /media/disk_by-partlabel_sandisk120gb. When the disk (removable USB flash drive) was not encrypted everything worked fine. But now pmount does not understand that the encrypted disk is on a pen drive. Maybe I need to add an option to crypttab? I want to use pmount and not mount because pmount does not require root.
I am on debian bullseye.