首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >.dmg提取问题

.dmg提取问题
EN

Ask Ubuntu用户
提问于 2015-07-01 19:45:11
回答 1查看 1K关注 0票数 1

我的外部硬盘上有磁盘映像文件。我尝试使用mac.dmg从7z x mac.dmg文件中提取文件,这就是我得到的:

代码语言:javascript
复制
Processing archive: mac.dmg

Extracting  0.MBR
Extracting  1.Type EE

Everything is Ok

Files: 2
Size:       250059350016

Compressed: 201276607141

我做了file 1.Type EE,得到了:

代码语言:javascript
复制
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)

我不知道该怎么做。

增编:

在与@the_Seppi讨论了这个问题之后,我在以下位置:

使用:gdisk -l ubun.img我得到:

代码语言:javascript
复制
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

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

我明白了:

代码语言:javascript
复制
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

然后试着dmesg | tail,我明白了:

代码语言:javascript
复制
[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
EN

回答 1

Ask Ubuntu用户

发布于 2015-07-01 20:42:30

从您可以看到的,该文件实际上是一个磁盘映像。您需要使用dmg2img (sudo apt-get install dmg2img)将其转换为img文件,然后可以在循环设备中挂载生成的img文件以浏览其内容:

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

票数 1
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/643308

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档