I have been doing a lot of fiddling with hard drive image files and gparted and I'd like to share what I've figured out.
You can make an image file of a hard disk with dd like so:
dd if=/dev/hda of=/mnt/a/MYIMAGE.IMG
then you can mount it using a loop device with losetup:
losetup /dev/loop0 /mnt/a/MYIMAGE.IMG
then you can run gparted using that loop device, specifying the devices you would like to use:
so if I'd like to copy partitions between an image file on /dev/loop0 and my hard drive on /dev/sda:
gparted /dev/loop0 /dev/sda
also if you have multiple loop devices you can use:
gparted /dev/loop0 /dev/loop1 /dev/sda
and when you wish to disconnect from the loop device just use:
losetup -d /dev/loop0
One thing I should mention: Knoppix 6.3 seems to require specifying loop.max_part=8 as a kernel parameter on the command line to get gparted to work right. Knoppix 6.2 doesn't seem to require this to work properly. Perhaps the version of gparted with 6.3 is a bit more finicky.
Anyway, have fun imaging and editing with gparted.
Don
Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD
$75.00
DELL PowerEdge R730XD 24x 2.5" Server Dual 750W Dual Heatsink - BareBones TESTED
$299.99
Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS
$721.06
H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W
$2512.18
DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45
$275.00
Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB
$510.00
Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox
$340.00
Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD
$389.99
Dell PowerEdge R820 Server 4x E5-4620 2.2GHz 32-Core Total 256GB 0HD 2x 1100w
$315.00
1U Supermicro Pro Server X10DRU-i+ 2x Xeon E5-2620 V3 32GB DDR4 RAM 4x 10GE RAIL
$190.00