Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I created an image of an NTFS partition using:

sudo dd if=/dev/sda3 | gzip -c > Windows.img.gz &

Is there any way that I can mount the compressed image directly? I do not have the disk space to unzip the whole image to mount it.

If it's not possible, is there a better way to create a compressed image that would be directly mountable?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

No, you can't. Instead of using dd to create the image in the first place, use ntfsclone. It is smart enough to skip the unused space. Even if you don't compress the image, without all of the trash in the unused blocks, it will probably be smaller than the compressed dd image, and you can mount that image directly.

share|improve this answer

No, not with gzip I'm afraid. The way gzip works it would be impossible to mount it as a block device. You could have used squashfs to compress your image. Sorry to bring you bad news but you can try with USB drive for example.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.