I have taken a complete image of a hard drive using:dd if=/dev/sda of=/home/user/harddriveimg bs=4MIt would seem to me, that I should be able to re-size the partitions within it after suitably mounting it.As I am less than familiar with the command line parted, I tried:gparted /home/user/harddriveimgWhile this loaded the partition table, it couldn't find the partitions themselves, e.g. harddriveimg0.Is it possible to modify an image file like this, without writing it back to some disk, and if so how? I would be perfectly happy with a solution that uses only terminal commands.
How to re-size partitions in a complete hard drive image?
filesystems;dd;storage;block device;gparted
You need to associate a loopback device with the file:sudo losetup /dev/loop0 /home/user/harddriveimgThen run gparted on that.