How to unlock LUKS encrypted volume on USB flash drive?

I recently started to use Fedora Linux 38 Workstation (kernel: Linux 6.3.6-200.fc38.x86_64, GNOME: 44.2), and I’m trying to create a LUKS encrypted volume on an external USB flash drive with GNOME Files (Nautilus) 44.2.1. Unfortunately I’m not able to unlock the volume when I try the steps below:

  1. In the program Files I right click the USB drive and choose “Format…”.

  2. Program Disks (gnome-disk-utility 44.0, UDisks 2.9.4) is started, where I name the volume and choose volume type and password protection (if I format the USB drive as Ext4 without password it works well and as expected):

  3. In Disks I set a simple password “123456”.

  4. In Disks, after a few seconds the volumes are created:

  5. In Files I dismount the USB drive in Files and physically unplug it from computer, plug it in again and then a password popup is shown. Two USB volumes are shown and named “15 GB Encrypted”. I enter password “123456” and press “Unlock” and it is accepted.

  6. In Files a new password popup is shown. The first USB volume is still named “15 GB Encrypted”, but the other called “Ext4 LUKS” as I named it in step 2 above. I enter password “123456” again and press “Unlock”.

  7. In Files I get error message “Sorry, that didn’t work. Please try again.” is shown, and I’m not able to unlock the USB drive. I have also tried to use the password I use to the LUKS encryption of the main partition at startup of Fedora, and also the password for my Fedora user account, but without any success.

Any help how to unlock the USB drive would be appreciated!

/ sivese

only know how such works from the command line:
( sudo cryptsetup luksFormat /path/to/device | partition ... options )
open as a mapper device:
1.) sudo cryptsetup luksOpen 'your device' 'short name in mapper' - asks for password,
make a file system inside the encrypted partition:
2.) sudo mkfs.ext4 ( -L optional label ) /dev/mapper/'short name in mapper'
mount to a folder:
3.) sudo mount /dev/mapper/'short name in mapper' 'name of dir to mount to'
4a.) sudo umount /dev/mapper/'short name in mapper' or
4b.) sudo umount 'name of dir mounted to'
close encryption:
5.) sudo cryptsetup luksClose 'short name in mapper'
in subsequent use repeat steps 1.), 3.), 4b.) 5.)
for more info use a good search engine or if not available google,
and search for ‘Kali encrypted persistence’

That’s weird. I’ve just tried to reproduce on Fedora 38 Silverblue and it works fine. Just one volume appeared in Files and I see its content after entering the password. Is the problem reproducible even after reformating the drive and rebooting?

You can try to unlock it directly in Disks over the button with the lock icon.

Thanks for help and apologies for late reply, I was out for holiday.

I just tried to use the eject button in Disks, unplug and plug in the USB, input password in popup, restart Files, and now only one USB volume is shown and it is accessible. I also tried to use the eject button in Files like in my original post, and now that also works.

So either it was my holiday break that solved the issue, or some of the Fedora updates that have been pushed out recently.

/ sivese

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.