If you may need to work on diskimages: ....
use losetup to setup a loopdevice:
losetup /dev/loop0 /tmp/img
use a partitioning tool to setup the partitions ...
use fdisk to calculate offset:
fdisk -lu IMAGE
where IMAGE may be the image-file or the loop-device
use offset for losetup to setup only one partition as loop:
losetup -o OFFSET /dev/loop0 /tmp/img
or for mounting:
mount -o loop=/dev/loop0;,offset=OFFSET /tmp/img /mnt /tmp/img