How to read/mount a .gz.dd image file?

11,164

Solution 1

Are you sure it's not a .dd.gz file?

Here's how you uncompress a gzipped file:

gunzip example.dd.gz

This should create a file named example.dd in your current working directory.

To mount a dd image file, create a directory, and mount the image to that directory:

$ mkdir exampledir/
$ mount -o loop example.dd exampledir/

You may need to specify more options to the mount command depending on what type of image your file is.

You can now view the files inside the image by browsing exampledir/.

Solution 2

If you want to read the files on-the-fly from your (gzip) compressed filesystem without having to unpack it, use mksquasfs and dd to create it in the first place.

You can also choose the compression with the -comp option of mksquashfs, e.g. gzip, lzo, xz etc.

See this answer on how to do it (backup/create image, mount one partition of a whole diskimage with the help of kpartx, etc.).

Share:
11,164

Related videos on Youtube

Wise
Author by

Wise

I know Python, Java and a little of C++ and php.

Updated on September 18, 2022

Comments

  • Wise
    Wise over 1 year

    I have a partition file (a .gz.dd file) that I need to read the files from. I'm new to Linux and I don't know how I can read/mount .dd files in Ubuntu. Would you guys tell me the procedure of reading the file? Thanks.

    • nanofarad
      nanofarad over 11 years
      Is it gz.dd, or dd.gz? I'd expect the latter to be more common.
  • Wise
    Wise over 11 years
    It was a .gz.dd file. But I renamed it to a dd.gz file and did the procedure you explained and it worked perfectly. Thanks for your help!
  • Cadoiz
    Cadoiz over 3 years
    Linux isn't so much about the file extensions, the .dd is merely for better readability. Meanwhile .gz is more seriously used for compressed files, so the file would more canonically be named example.dd.gz
  • Cadoiz
    Cadoiz almost 3 years
    You can also consider this answer.