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.

  • This error is often caused by a truncated archive. Can you ask someone to send you the file again?
    – terdon
    Commented Oct 11, 2012 at 16:29
  • What makes you think its a zip file?
    – jordanm
    Commented Oct 11, 2012 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. Commented Oct 12, 2012 at 12:29
  • What's the output of file XX.dd.gz
    – daisy
    Commented Oct 12, 2012 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" Commented Oct 14, 2012 at 2:46

3 Answers 3


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.

  • 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? Commented Oct 12, 2012 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
    Commented Oct 13, 2012 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). Commented Oct 14, 2012 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


I've got bunch of corrupted .gz files with text files inside, tried to use unzip -FF with no success. Surprisingly 7z managed to extract with no problem, gave me ERROR: Unexpected end of data but extracted:

sudo apt-get install p7zip-full

7z x text.log.gz

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .