Without thinking, I made a partimage image of a ~1TB ext3 partition, which only actually contained about 2GB of data, so gzipped down to that size. I then wiped it and used it for something else.
I'd now like to delete the partimage partition, but just want to double-check what it contains before I do so. However, I don't have 1TB of spare space to work in and restore it to, and partimage itself insists on this. Is there any way to shrink the partition inside the partimage image without unzipping? Alternatively, is there a way to mount it or see what's inside?
Thanks.
If most of the image is properly empty (blocks of zeros), which it probably is to compress so well, you could try restore it in a virtual machine with a "not preallocated" disk. i.e.:
The virtual disk will hopefully not grow for empty blocks.
Edit: you might not have to do the "install OS" in step 2 - if you could normally run the restore operation from a bootable Live CD or USB drive then you could just boot the VM off that media (or an image of that media in a file) too.
The best way to do this is to combine the instructions found here:
http://www.coolacid.net/20080908134/Latest/restore-a-partimage-backup-to-loopback (make sure you read the comments on this page as step 3 has been updated)
with the instructions found here:
http://cptl.org/wp/index.php/2010/04/29/resizing-a-linux-disk-image-file/
Step by step:
I am currently going to attempt this process to restore a partimage to a raid 1 exported disk as a solution to my own question here:
3WARE 9650-4LPML JBOD DISK to RAID - 1 Mirror Migration How To?
I believe you can mount the image as though it were an .iso. You will need to unzip it first or there may be a way to mount it zipped... google is your friend.
I found this command with the keywords "mount iso ubuntu" in google.
sudo mount debianetch.iso /media/isoimage/ -t iso9660 -o loop