Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recieved this file that I was told was a copy of a hard drive (or disk). The file is "sheeva-mem.dd.gz". I tried to unzip the file in a linux Fedora machine. This yielded "unexpected end of file". Someone told me to mount the file to a partition within the linux machine, and then I would be able to view the information within the file. I assume the file has to be unzipped before this can happen? If that is the case, is there anyway around the "unexpected end of file" (maybe a repair, or something that ignores the errors)? This is the only copy of the file.

share|improve this question
This error is often caused by a truncated archive. Can you ask someone to send you the file again? – terdon Oct 11 '12 at 16:29
What makes you think its a zip file? – jordanm Oct 11 '12 at 21:29
No someone cannot resend the file, this is the only copy. And the ".gz" at the end of it makes me think its zipped. – Smurfinator09 Oct 12 '12 at 12:29
What's the output of file XX.dd.gz – warl0ck Oct 12 '12 at 23:47
the output is "sheeva-mem.dd.gz: gzip compressed data, was "sheeva-mem.dd", from Unix, last modified: Fri Sep 14 20:58:18 2012" – Smurfinator09 Oct 14 '12 at 2:46

You can use the gzrt (gz repair tool) to unzip whatever part of the dd file remains. You can then type

gzrecover sheeva-mem.dd.gz

and attempt to mount the dd file:

mount sheeva-mem.dd /mnt/image -o loop

Possibly, the filesystem will be corrupted. You can attempt to repair it with fsck.

share|improve this answer
Ok, when I try to run the gzrecover command it says "command not found". Is this a tool that I need to download or should it already be on the system? – Smurfinator09 Oct 12 '12 at 12:30
Yes, you need to install this tool. I don't know what your system is, on Debian based systems you can just do sudo apt-get install gzrt – January Oct 13 '12 at 8:04
Im running a Fedora 64-bit, and that command does not work. I tried to get the tool the "normal" way (with Yum, how I get all my other stuff), but that didnt work. Do you know where I can get it off the internet, or the command on Fedora? (thx for all your help btw). – Smurfinator09 Oct 14 '12 at 2:44

gzip != zip. gzip is a stream compressor, zip is an index'd compressor. They are completely different programs. "zip" is based on "PKzip", and is represented by the tools "unzip" and "zip" and uses ".zip"; GNU zip is "gzip" and "gunzip", uses the extension ".gz".

You can gunzip file.dd.gz and get file.dd, but that'll suck up a lot of space unfortunately.

Once you have the file.dd, just do, probably as root,

mount -o loop file.dd /mnt

to access the contents on /mnt

share|improve this answer

Your Answer


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.