Peek into .img files
-
Is there a way to browse the contents of a .img file in such a way that you’re able to view the contents of the original partition that the .img file represents? This would be similar to the Ghost software that allows you to browse a .gho image of a drive.
-
Technically it is possible using the partclone-utils stuff, but you do have decompress the img file first.
-
You might need NTFS support…
I wouldn’t recommend fiddling with this on your production FOG server… maybe use a Linux Live CD on a desktop, and copy over your image via NFS and do it on the Live CD ?
-
@Tom-Elliott said:
Technically it is possible using the partclone-utils stuff, but you do have decompress the img file first.
With a script to uncompress/mount and a php folder browser
-
It seems like it would be easier to just restore the image to a client, but I had to find a way.
All of this is done on Debian 7 and like Wayne I would not advise you doing this on your production server.
Breakdown:
Install ntfs-3g, partclone, and pigz
Decompress image and restore to a file
Mount imageapt-get install ntfs-3g partclone pigz cd /images/SecurityE420s/ cat d1p2.img | pigz -d -c | partclone.restore -C -s - -O d1p3.img mount -t ntfs-3g d1p3.img /mnt ls -lah /mnt total 6.9G drwxrwxrwx 1 root root 4.0K Aug 27 2014 . drwxr-xr-x 28 root root 4.0K Jun 18 17:15 .. lrwxrwxrwx 2 root root 60 Jul 14 2009 Documents and Settings -> /mnt/Users -rwxrwxrwx 1 root root 9.5K Aug 28 2014 fog.log -rwxrwxrwx 1 root root 3.0G Aug 28 2014 hiberfil.sys drwxrwxrwx 1 root root 0 Aug 27 2014 Intel drwxrwxrwx 1 root root 0 Jun 11 2014 MSOCache -rwxrwxrwx 1 root root 4.0G Aug 28 2014 pagefile.sys drwxrwxrwx 1 root root 0 Jul 13 2009 PerfLogs drwxrwxrwx 1 root root 4.0K Aug 28 2014 ProgramData drwxrwxrwx 1 root root 8.0K Aug 27 2014 Program Files drwxrwxrwx 1 root root 8.0K Aug 27 2014 Program Files (x86) -rwxrwxrwx 1 root root 3.1K Aug 28 2014 QcOSD.txt drwxrwxrwx 1 root root 0 Aug 26 2014 $Recycle.Bin drwxrwxrwx 1 root root 4.0K Jun 11 2014 System Volume Information drwxrwxrwx 1 root root 4.0K Nov 20 2010 Users drwxrwxrwx 1 root root 40K Aug 28 2014 Windows
-
Neat, I’ll have to give this a shot. Thank you guys.