69835.7 / 15 May 2016

mount a gnome disks image of a full disk

I often to backups before big changes to my system, or just hacks that I am not sure if it will blow up my system.

Sometimes I run Unity from time to time and I am not sure if other back systems run in a similar fashion, but I assume they do.  The program I used for this particular back up was Gnome Disks.  Since I am normally a KDE user I had to figure out how to mount the img file without being in a GTK environment.

Fourtantely it is fairly easy to do.  Just three commands.

This mounts the image.

1
sudo losetup -f -P DiskImage.img

This displays the devices partition layout and assignments.

1
lsblk -f

This mounts the partition table.  Make sure you change /dev/loop0p7 to your device.

1
sudo mount /dev/loop0p7 /mnt/