How to mount a LUKS encrypted disk image from a usb drive

April 01, 2025

How to mount a disk image backup created using gnome disks in linux.

I got a new laptop last year and increased the ssd size. Before moving to the new one I created did a full disk backup to an external usb drive using gnome disks which creates a ".img" file.

The old disk was from ubuntu 20.04 and had an LUKS encrypted partition. Unfortunately attempting to mount it from the UI in KDE neon gave various errors.

An error occurred while accessing '1.9 TiB Encrypted Drive', the system responded: An unspecified error has occurred: No such interface “org.freedesktop.UDisks2.Filesystem” on object at path /org/freedesktop/UDisks2/block_devices/dm_2d0

Installing udisks2-lvm2 did not make any difference.

After trying many different things I gave up on the UI and found this similar question that provided instructions that actually worked on KDE neon.

sudo losetup -P /dev/loop100 /media/<user>/DiskID/backup-2024.img 
sudo cryptsetup luksOpen /dev/loop100p3 linux-backup
cd /mnt
sudo mkdir linux-backup
sudo mount /dev/mapper/neon--vg-root /mnt/linux-backup

After entering the password in the cryptsetup command and mounting all the backup files could be browsed by going to /mnt/linux-backup and I was able to get the files needed.

Hope it helps someone!