Hi Mark

I've never tried this but it may work!! I don't have any test images small 
enough to try it out on at the moment.

You can perform on the fly decompression using gzip by appending -c (to 
standard out) and -d (decompress) before a pipe (|).

This works for hashing as follows: # gzip -cd image.dd.gz | sha1sum

This writes the output of gzip to standard out (-c) and decompresses it (-d). 
The decompressed output is then piped into the sha1sum command (so basically it 
is redirecting standard out to the command via the pipe).

I can't see any reason that this would not work on a mount command such as: 
#gzip -cd image.dd.gz | mount -t <fs-type> <options> /mnt/image

To get the volume (you can't mount at disk level, only volume unless you use an 
enhanced loopback device) you may have to pre-calculate your partition offsets 
before you compress then add it into the mount command using the "-o" switch. 
Sleuthkit's "mmls" command should give you the partition offsets.

I'd be interested to know if it works?

Stu    




________________________________
 From: Mark Rogers <m...@quarella.co.uk>
To: Peterborough LUG - No commercial posts <peterboro@mailman.lug.org.uk> 
Sent: Thursday, 17 May 2012, 13:55
Subject: [Peterboro] Mounting disk images
 
Now that I'm starting to play with ARM devices I'm ending up with various 
images of SD cards to manage.

Suppose I have an SD card in a USB card reader, /dev/sdb, containing two 
partitions (/dev/sdb1,/dev/sdb2).

I can image it with dd to a compressed image:
    sudo dd if=/dev/sdb | gzip > myimage.dd.gz

What are my options for later mounting (say) the second partition from the 
compressed image?

Ideally I'd like to do this without uncompressing (usually it's just a case of 
wanting to see the contents of a single file off the image).

If I have to do my images in a different way that's fine, particularly if I can 
convert the existing ones.

mark

-- Mark Rogers // More Solutions Ltd (Peterborough Office) // 0844 251 1450
Registered in England (0456 0902) 21 Drakes Mews, Milton Keynes, MK8 0ER


_______________________________________________
Peterboro mailing list
Peterboro@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/peterboro
_______________________________________________
Peterboro mailing list
Peterboro@mailman.lug.org.uk
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to