我正在尝试为朋友从外部硬盘恢复数据。
我正在使用 Knoppix 最新版本,从 USB 启动它。
我使用 的教程创建了一个图像 (.img) ddrescue
,但现在我拥有该copia.img
文件但无法安装它。
如果我尝试安装终端,则会显示:
mount: wrong fs type, bad option, bad superblock on .....
Run Code Online (Sandbox Code Playgroud)
该驱动器用于存储照片,不包含任何操作系统或类似内容。
如果我对 copia.img 文件运行 File 命令,它会显示:
DOS/MBR 引导扇区,代码偏移 0x52+2,OEM-ID“NTFS”,媒体描述符 0xf8,扇区/磁道 63,磁头 255,隐藏扇区 63,dos <4.0 BootSector (0x80),FAT(描述符为 1Y biy) ;NTFS,扇区/磁道 63,扇区 1953520001,$MFT 起始簇 21931768,$MFTMirror 起始簇 477176,簇/RecordSgement 2,簇/索引块 8,序列号 0d2c6a522c6a507b5;包含 Microsoft Windows XP/Vista 引导加载程序 BOOTMGR
另外,如果我运行 dmesg 命令,它会显示:
拜托你能帮我恢复它吗?
From the output of your call to file
, it appears that your file is
an image of a whole block device, containing several partitions,
rather than a single filesystem. This explains why mount
could not
mount it: that command supports mounting single filesystems.
To mount a filesystem that is within a disk image, you have to:
fdisk -l
on the image to find the file system offsets;<offset> * <block size>
以获得以字节为单位的偏移量;我摘录自 https://web.archive.org/web/20170917154947/http://madduck.net/blog/2006.10.20:loop-mounting-partitions-from-a-disk-image/ ,其中有完整的说明;这可能看起来像:
$ /sbin/fdisk -lu disk.img
[...]
Units = sectors of 1 * 512 = 512 bytes
Device Boot Start End Blocks Id System
[...]
disk.imgp7 10860003 68372639 28756318+ 83 Linux
# losetup /dev/loop0 disk.img -o $((10860003 * 512))
# file -s /dev/loop0
/dev/loop0: Linux rev 1.0 ext3 filesystem data
# mount /dev/loop0 /mnt
[...]
# umount /mnt
# losetup -d /dev/loop0
Run Code Online (Sandbox Code Playgroud)
同一篇博客文章表明,名为“kpartx”的新包可能能够自动执行计算。