我有一个 500GB 的磁盘,正在尝试使用它进行恢复GNU ddrescue
。
这是fdisk
500GB 磁盘的情况:
Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disk identifier: 0xeea5da13
Device Boot Start End Blocks Id System
/dev/sdc1 63 976768064 488384001 7 HPFS/NTFS/exFAT
ddrescue
完成了复制运行并正在执行以下操作:
GNU ddrescue 1.21
Press Ctrl-C to interrupt
Initial status (read from mapfile)
rescued: 481966 MB, errsize: 70382 kB, errors: 121
Current status
ipos: 482180 MB, non-trimmed: 0 B, current rate: 262 kB/s
opos: 482180 MB, non-scraped: 17927 MB, average rate: 614 kB/s
non-tried: 0 B, errsize: 70382 kB, run time: 3m 54s
rescued: 482110 MB, errors: 121, remaining time: 1d 10h 58m
percent rescued: 96.40% time since last successful read: 0s
Scraping failed blocks... (forwards)
上述步骤现已完成,文件fdisk -l
上的内容如下backup.img
:
Disk /media/victor/New Volume4/backup.img: 497.3 GB, 497334280192 bytes
255 heads, 63 sectors/track, 60464 cylinders, total 971356016 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xeea5da13
Device Boot Start End Blocks Id System
/media/victor/New Volume4/backup.img1 63 976768064 488384001 7 HPFS/NTFS/exFAT
当我这样做时,sudo mount -o ro,offset=$((512*63)) backup.img /media/myName/recovery
我得到:
Failed to read last sector (976768001): 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?
现在我该怎么做?
答案1
我怀疑是错误的工具。Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)?
是一个有用的指针 - 我猜你对 /dev/sdc 进行了成像,并且 mount 与设备图像混淆了。
改用 kpartx - 我相信 kpartx -a -v backup.img 将在 /dev/mapper 中添加一系列设备,然后您可以按正常方式挂载这些设备。
答案2
我使用 Windows 安装该映像OSFMount
,它运行完美。我可以像访问常规驱动器一样访问它,并且可以从中提取文件。
总而言之,我有一个 500GB 的驱动器,用于备份文件。它被格式化为 NTFS。没有其他分区。读写速度急剧下降,所以我花了一个星期GNU ddrescue
在 Linux 中对整个磁盘进行完整映像。然后我OSFMount
实际上将它安装在 Windows 中并从中获取文件。