1

I have disk image file on my external HDD. I tried to extract file from mac.dmg file using 7z x mac.dmg and this is what I got:

Processing archive: mac.dmg

Extracting  0.MBR
Extracting  1.Type EE

Everything is Ok

Files: 2
Size:       250059350016

Compressed: 201276607141

I did file 1.Type EE and got:

1.Type EE: GPT data structure (nonstandard: at LBA 0), version 1.0, GUID: 66741e19-807b-4f4f-a1e4-652d7892adf3, disk size: 488397168 sectors (sector size unknown)

I don't know what to do know.

Addendum:

After discussing the problem with @the_Seppi, this where I am at:

Using: gdisk -l ubun.img I get:

Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Warning! One or more CRCs don't match. You should repair the disk!

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk ubun.img: 488397168 sectors, 232.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 66741E19-807B-4F4F-A1E4-652D7892ADF3
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Partitions will be aligned on 8-sector boundaries
Total free space is 13 sectors (6.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       487127591   232.1 GiB   AF00  Untitled 1
   3       487127592       488397127   619.9 MiB   AB00  Recovery HD

Doing this: sudo apt-get install hfsprogs mkdir \mnt\backup sudo mount -o force,loop,offset=$((409640*512)) -t hfsplus ubun.img /mnt/backup/

I get this:

mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Then trying dmesg | tail, I get this:

[529744.283668] FAT-fs (loop0): Can't find a valid FAT filesystem
[529744.283832] hfsplus: unable to find HFS+ superblock
[530011.118941] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
[530011.119017] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
[530011.119052] EXT4-fs (loop0): VFS: Can't find ext4 filesystem
[530011.119127] FAT-fs (loop0): bogus number of reserved sectors
[530011.119130] FAT-fs (loop0): Can't find a valid FAT filesystem
[530011.119274] hfsplus: unable to find HFS+ superblock
[530073.047405] hfsplus: unable to find HFS+ superblock
[530292.332266] hfsplus: unable to find HFS+ superblock
8
  • What is the dmg supposed to do? I'd guess it's a Mac OS bootloader recovery image...
    – s3lph
    Jul 1, 2015 at 19:46
  • I think so too. I used dmg2img to convert .dmg to .img and when I 'file ubun.img` I got ubun.img: x86 boot sector
    – psimeson
    Jul 1, 2015 at 19:55
  • So what is your actual question?
    – s3lph
    Jul 1, 2015 at 20:00
  • My question is that is there a way to extract my files from the things that I have backed up
    – psimeson
    Jul 1, 2015 at 20:04
  • Extract what things from which backup? What's the DMG got to do with it?
    – s3lph
    Jul 1, 2015 at 20:06

1 Answer 1

1

From what you can see, that file is actuallty a disk image. You need to convert it to an img file using dmg2img (sudo apt-get install dmg2img), then you can mount the resulting img file in a loop device to browse its content:

mount -o loop example.img /home/you/dir

2
  • 2
    Please read my comments to the main question and updated question itself.
    – psimeson
    Jul 1, 2015 at 21:05
  • What if you mount the whole img instead of only a partition?
    – big_bum
    Jul 2, 2015 at 13:31

You must log in to answer this question.

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