我有一台 WD Passport 1TB 外置硬盘,在硬盘完全停止读取之前,ddrescue 成功挽救了其中的 95%。
恢复的数据存储为recovery.img
。
$ mmls recovery.img
DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors
Slot Start End Length Description
000: Meta 0000000000 0000000000 0000000001 Primary Table (#0)
001: ------- 0000000000 0000002047 0000002048 Unallocated
002: 000:000 0000002048 1953458175 1953456128 NTFS / exFAT (0x07)
但是我无法将映像挂载为 NTFS:
$ sudo mount -t ntfs recovery.img /mnt
NTFS signature is missing.
Failed to mount '/dev/loop11': Invalid argument
The device '/dev/loop11' 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?
$ sudo ntfsfix recovery.img
Mounting volume... NTFS signature is missing.
FAILED
Attempting to correct errors... NTFS signature is missing.
FAILED
Failed to startup volume: Invalid argument
NTFS signature is missing.
Trying the alternate boot sector
Unrecoverable error
Volume is corrupt. You should run chkdsk.
chkdsk recovery.img
我的 Windows 机器上显示文件名无效。
我还尝试使用偏移量(2048 * 512),如中所述Ubuntu 数据恢复文档:
$ sudo mount -t ntfs -o loop,force,offset=1048576 recovery.img /mnt
Failed to read last sector (1953456126): 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/loop11': Invalid argument
The device '/dev/loop11' 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?
testdisk[ List ]
文件确实有效,所以我将尝试从那里复制。但如果可能的话,我想挂载。
我现在应该尝试什么,有什么想法吗?
编辑:kpartx 的结果,使用列出的说明这里:
$ sudo kpartx -l recovery.img
loop11p1 : 0 1953456128 /dev/loop11 2048
$ sudo kpartx -a recovery.img
device-mapper: resume ioctl on loop11p1 failed: Invalid argument
create/reload failed on loop11p1
答案1
我最终只使用 testdisk 列出并复制了磁盘映像的全部内容。幸运的是,似乎我的所有文件都保存了下来(没有一个文件位于坏读区域)。