I am using Ubuntu 22.04 and would like to mount an opened LUKS device (USB pen drive) in /media/user_name/...
for it to show up in the Ubuntu file explorer.
When inserting the drive a dialog immediately opens asking for a password to unlock the drive. Since I am using a key file to unlock the device I cancel the dialog. At this point the drive is visible in file explorer and can be ejected.
In a terminal, I open the device with sudo cryptsetup open /dev/sda1 LuksUsb --type luks2 --key-file the_key_file
. The drive now disappears from the file explorer.
With lsblk -o NAME,TYPE,SIZE,FSTYPE,UUID,MOUNTPOINT
I see sda
, sda1
, and LuksUsb
.
sda1
has filesystem type crypto_LUKS
and LuksUsb
no fstype. The device is now also in /dev/mapper/LuksUsb
.
Next I want to mount the device in /media/user_name/Luks
.
First, creating Luks
dir in /media/user_name/
then mounting with mount /dev/mapper/LuksUsb /media/user_name/Luks
.
The resulting error message:
mount: /media/user_name/Luks: wrong fs type, bad option, bad superblock on /dev/mapper/LuksUsb, missing codepage or helper program, or other error.
I have tried explicitly passing a filesystem type (-t ext4
in this case) to the mount command, but the outcome is the same.
Also tried mount -t ext4 /dev/sda1 /media/user_name/Luks
yields error message mount: /media/user_name/Luks: /dev/sda1 already mounted or mount point busy.
Insights much appreciated.