相关疑难解决方法(0)

如何挂载用 /bin/dd 创建的`img` 硬盘驱动器?

我曾经dd备份过一个80GB 的驱动器

dd if=/dev/sdb of=~/sdb.img
Run Code Online (Sandbox Code Playgroud)

现在我需要访问该驱动器上的一些文件,但我不想将“.img”复制回驱动器。

mount ~/sdb.img /mnt/sdb也不起作用。它返回:

mount: you must specify the filesystem type
Run Code Online (Sandbox Code Playgroud)

我试图找到文件系统类型 file -s

fox@shoebox $ file -s sdb.img
sdb.img: x86 boot sector; partition 1: ID=0x12, starthead 1, startsector 63, 10233342 sectors; partition 2: ID=0xc, active, starthead 0, startsector 10233405, 72517410 sectors; partition 3: ID=0xc, starthead 0, startsector 82750815, 73545570 sectors, code offset 0xc0
Run Code Online (Sandbox Code Playgroud)

是否可以安装sdb.img,或者我必须使用它dd来恢复驱动器?

mount dd

20
推荐指数
2
解决办法
2万
查看次数

使用命令 pv 可以克隆驱动器,如何安装它?

我能够使用以下命令备份驱动器。

pv -EE /dev/sda > disk-image.img
Run Code Online (Sandbox Code Playgroud)

这一切都很好,但现在我无法看到文件,除非我使用这个命令

pv disk-image.img > /dev/sda
Run Code Online (Sandbox Code Playgroud)

当然,这将数据写回磁盘,这不是我想要做的。我的问题是我能做些什么来挂载.img文件本身而不是仅仅写回磁盘?


我试过使用循环挂载,但它似乎抱怨无效的 NTFS。

$ mount -o loop disk-image.img
mount: disk-image.img: can't find in /etc/fstab.
$ mount -o loop disk-image.img /mnt/disk-image/
NTFS signature is missing.
Failed to mount '/dev/loop32': Invalid argument
The device '/dev/loop32' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
Run Code Online (Sandbox Code Playgroud)

mount disk-image pv

6
推荐指数
1
解决办法
1991
查看次数

标签 统计

mount ×2

dd ×1

disk-image ×1

pv ×1