#28 cmdline tool to extract partimage to hdimage


Would be nice to have a server side comand line tool
that can extract PartImage volume files into a single
large raw Hard Drive Image file, using Large File
Support (>2Gb) and sparse writes (seek() -> write(),
seek() -> write()).

"Hard Drive Image" file format is nothing special, this
is a raw sector dump of the original partition into one
large file that. A bit like doing:

dd if=/dev/hda1 of=/tmp/myHda1.hdimg


  • Tomasz Ostrowski

    Logged In: YES

    At least there should be an option to restore to file which
    is not a device. Now it is not possible - the following
    message will be shown:
    The second argument [[filename]] must be a valid device (ex:

    This feature would be very useful when only a few files are
    needed from image file and there's no free partition
    available to restore the image. It would be possible to
    restore to "hard drive image", mount with a "loop" option
    and access the files.

  • Tomasz Ostrowski

    Logged In: YES

    I've found a workaround but a little bit complex. The
    following works on Linux:

    1. Create sparse file of partition size (or more), like this:
    # dd if=/dev/zero of=looppartition bs=1M count=[size_in_bytes]

    2. Check and for first free loop device:
    # losetup -f

    3. Setup this free loop device to use the file you created
    in step 1:
    # losetup /dev/loop0 looppartition

    4. Restore the image to /dev/loop0:
    # partimage restore /dev/loop0 backup.partimage

    5. Remove loop device setup:
    # losetup -d /dev/loop0

    6. Mount image file with a "loop" option:
    # mount looppartition /mnt -o loop


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks