我能够使用以下命令备份驱动器。
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)