Mount dd image with multiple partitions

Use kpartx (from multipath-tools):

use losetup to get a /dev/loop? device, then use kpartx on it to create dev mappings for the partitions in the image file.


Doing one partition at a time isn't too difficult. Basically you use losetup with the offset parameter. Here is an article that describes the steps, and here is another.

If you wanted to do all at once you would probably have to write a script that retrieved the partition table from the disk image, and then ran losetup several times to create several loop devices. I am not aware of any tools that do this for you.