我使用以下命令从包含多个分区的磁盘制作了单个分区的镜像:
#ddrescue -d -r3 /dev/sdb3 sdb3.img sdb3.logfile
但是,当我尝试使用以下命令安装镜像时:
mount -o loop,ro sdb3.img /media/mymount
我收到以下错误消息:
Failed to read last sector (81919999): Invalid argument
HINTS: Either the volume is a RAID/LDM but it wasn't setup yet,
or it was not setup correctly (e.g. by not using mdadm --build ...),
or a wrong device is tried to be mounted,
or the partition table is corrupt (partition is smaller than NTFS),
or the NTFS boot sector is corrupt (NTFS size is not valid).
Failed to mount '/dev/loop0': Invalid argument
The device '/dev/loop0' 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?
任何解决该问题的帮助都将不胜感激。
问候
最佳答案
要从镜像文件挂载分区,您可以使用 kpartx
。
要列出该工具在图像文件中检测到的映射:
kpartx -l sdb3.img
然后添加映射:
kpartx -a sdb3.img
分区将在/dev/mapper
下显示为设备,然后可以正常挂载。
参见man kpartx
和这个blog .
关于linux - 挂载包含单个分区的镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26712730/