Is there a way to browse through the image files?



  • Hi,

    is there a way to extract single files and folders out of the image files?

    [B]EDIT:[/B]
    I found this on the net:
    [QUOTE]partimage only copies used blocks so you need to restore to a device (in this case a block file loop mounted) – I have done this with FOG images as an experiment.[/QUOTE]

    Do these using sudo/as root if required:
    [CODE]1. gunzip image file (force suffix with -S “”)

    1. partimage imginfo <imagefile>
    2. dd if=/dev/zero of=<blockfile> bs=1024 count=0 seek=<size in GB10241024>
    3. losetup /dev/loop0 <blockfile>
    4. partimage restore /dev/loop0 <imagefile>
    5. sudo mount -t ntfs-3g /dev/loop0 /media/temp/[/CODE]

    Will this work?

    Greetz X23



  • Hi,

    i found something more:

    [QUOTE]
    [INDENT=1]yoda wrote:I’ve found a fairly easy way to extract individual files from a partimage image file. These are the steps (Linux):[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]1. create a target image file using dd, e.g.[/INDENT]
    [INDENT=1]Code: [URL=‘http://www.partimage.org/forums/viewtopic.php?t=950#’]Select all[/URL][/INDENT]
    [INDENT=1]dd if=/dev/zero of=image bs=1024 count=3774771[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]where 3774771 is the number of 1K blocks. You can use “fdisk -l” on the original system to obtain the exact amount. However, I suppose you can obtain the rounded amount from partimage imginfo command and use an overestimated value;[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]2. associate this image with a loopback device, e.g.[/INDENT]
    [INDENT=1]Code: [URL=‘http://www.partimage.org/forums/viewtopic.php?t=950#’]Select all[/URL][/INDENT]
    [INDENT=1]losetup /dev/loop0 image[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]where loop0 has to be replaced with a higher numbered device (loop1, loop2, etc.) if loop0 is already in use (you can also use the -f option to use the next one available);[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]3. create a mount point, e.g.[/INDENT]
    [INDENT=1]Code: [URL=‘http://www.partimage.org/forums/viewtopic.php?t=950#’]Select all[/URL][/INDENT]
    [INDENT=1]mkdir mnt[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]4. mount the image from the loopback device, e.g.[/INDENT]
    [INDENT=1]Code: [URL=‘http://www.partimage.org/forums/viewtopic.php?t=950#’]Select all[/URL][/INDENT]
    [INDENT=1]mount -o ro /dev/loop0 mnt[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]5. and that is! You can now browse the files in the mnt directory.[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]Note that steps 2-4 have to be done as superuser (root).[/INDENT]
    [INDENT=1] [/INDENT]
    [INDENT=1]Regards,[/INDENT]
    [INDENT=1]Rodrigo Ventura[/INDENT]

    Hello Yoda

    I think there is one step missing, because:

    1. create an empty file
    2. connect it to a loop device
    3. create mountpoint
    4. mount loop device/file to the mountpoint
      -> 5) you see an empty filesystem :wink:

    So between 2) and 4) one has to restore the partimage image to this filesystem… right?[/QUOTE]

    Can someone tell if these steps are correct and working?

    Greetz X23


Log in to reply
 

364
Online

38982
Users

10712
Topics

101678
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.