2

Before formatting my hard drive to dual boot a new install of both Windows and Xubuntu, I made an ISO of my whole SSD and put it on my data hard disk by doing this from a live CD: dd if=/dev/sda of=/data/OldDisk.iso. This means it contains all of the partitions on there and meant it would be easy to replace Windows (including the MBR etc.) if the whole thing went tits-up.

Now I would like to mount the ISO as a normal hard drive so I can mount a partition on that drive (or mount a specific partition on the ISO) so I can access some of the old files (specifically my music collection) that I forgot was on my SSD not my HDD.

How would I go about doing this?

P.S. XUbuntu is amazing on a powerful PC because the boot time is 2 seconds! Only use Win for some games!

2 Answers 2

2

Use kpartx to create loop devices for each partitions inside the iso image, then mount the created devices. Following Robert Penz blog explanation, you could type these commands in a terminal :

sudo kpartx -a /data/OldDisk.iso
sudo mount /dev/mapper/loop0pX /mnt/ -o loop,ro
# point your file browser to /mnt

and, when you're done

sudo umount /mnt
sudo kpartx -d /data/OldDisk.iso

In these commands, X is a partition number

3
  • Thank you so much. I couldn't find this anywhere on the internet! (Turns out I was searching for the wrong thing!)
    – Stephie
    Jun 26, 2014 at 16:39
  • Sure! It ws easier for me as I already knew what to search. Glad you could recover your files.
    – exore
    Jun 27, 2014 at 6:11
  • Didn't work for me... Got a device on /dev/loop0 according to kpartx -d /path/to.iso.. Mar 14, 2020 at 21:25
0

The easiest way is to find the file with nautilus (files), right click on the file and choose 'Open with Archive Mounter'

3
  • This doesn't work because it is not a partition or even a file system in the ISO but a whole disk.
    – Stephie
    Jun 26, 2014 at 16:34
  • @RX14 OK I can see that might be an issue. Probably why I prefer rsync to make backups of my files. Jun 26, 2014 at 16:39
  • But rsync doesn't copy the MBR does it? I wanted to do a simple dd if=/data/OldData.img of=/debv/sda if things went wrong! Rsync would mean I would have to make a new NTFS FS and fix Windows's boot!
    – Stephie
    Jun 26, 2014 at 16:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .