Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#28 cmdline tool to extract partimage to hdimage

open
nobody
None
5
2005-09-11
2005-09-11
Darryl Miles
No

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

Discussion

  • Logged In: YES
    user_id=352834

    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:
    /dev/hda1).

    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.

     
  • Logged In: YES
    user_id=352834

    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
    /dev/loop0

    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