[TriLUG] mount -o loop on a gzipped image?

Alan Porter porter at trilug.org
Wed Oct 5 15:03:38 EDT 2005


> 1) Is it possible to somehow filter mount through gzip so that I can do
> a loopback mount on a zipped image without needing to unzip the image?
> I do not have 70GB free in which to unzip.


No, you can't.  Gzip is a stream-based compression.  Loop devices
are block devices.  There are other packages that create compressed
loop devices, like Klaus Knopper's "cloop".


> 2) If the image contains multiple partitions, can I do #1 and also
> choose a particular partition to mount within the image?


Again, you can't do #1.  But if you unzipped the image, you could
do #2 using mount's "offset=xxx" option.  You'd calculate the offset
by doing "fdisk -lu bigdisk.img" and computing where the partition
starts within the image file.


Alan






More information about the TriLUG mailing list