Restore a partimage backup to loopback
Sunday, 07 September 2008 21:57
- You need a file to mount as a HDD device - using DD, the following will instantly create a file of SIZE Gigabytes:
dd if=/dev/zero of=myharddisk.img bs=1000 count=0 seek=$[1000*1000*SIZE]
You need to make this file look like a block device (Choose a free /dev/loop device):
losetup /dev/loop0 myharddisk.img
- Start partimage manually from the command line, pointing to your loop device
partimage /dev/loop0 backupfile.000
- Remove the file from the loop device
losetup -d /dev/loop0
- Mount the new file on a directory
mount myharddisk.img /path/to/dir -o loop
- Enjoy the backup's files
My Certifications![]()


Tags
This will be shown to users with no Flash or Javascript.











Thanks for the nice tutorial. You might appreciate this master-class level use of loopbacks and kvm here:
http://www.wand.net.nz/~smr26/wordpress/2008/08/28/kvm-the-hard-way/
Don't you know a way of directly mounting my partimage file or its uncompressed version?