无法读取扩展分区表(偏移=x):参数无效,磁盘分区大小错误

无法读取扩展分区表(偏移=x):参数无效,磁盘分区大小错误

我有一个 500GB 硬盘,只能启动到 grub rescue。分区表似乎已损坏,因为 fdisk 报告一个分区为 3.6T。我已经运行了 testdisk (结果如下),但不确定如何继续,我需要做的就是安装分区以从中获取一些文件。

Failed to read extended partition table (offset=964032512): Invalid argument
Disk /dev/sde: 465.8 GiB, 500107862016 bytes, 122096646 sectors
Units: sectors of 1 * 4096 = 4096 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x00052d57

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sde1  *         2048 964032511 964030464  3.6T 83 Linux
/dev/sde2       964032512 976773167  12740656 48.6G  5 Extended
parted /dev/sde print
Error: Cannot have a partition outside the disk!
Ignore/Cancel?
Ignore/Cancel?
Ignore/Cancel? i
Error: Cannot have a partition outside the disk!
Ignore/Cancel?
Ignore/Cancel?
Ignore/Cancel? i
Error: Cannot have a partition outside the disk!
Ignore/Cancel? i
Error: Invalid argument during seek for read on /dev/sde
Retry/Ignore/Cancel? i
Error: Invalid partition table on /dev/sde -- wrong signature 6475.
Ignore/Cancel? i
Error: Cannot have a partition outside the disk!
Ignore/Cancel? i
Model: WDC WD50 03AZEX-00MK2A0 (scsi)
Disk /dev/sde: 500GB
Sector size (logical/physical): 4096B/4096B
Partition Table: msdos
Disk Flags:

Number  Start   End     Size    Type      File system  Flags
 1      8389kB  3949GB  3949GB  primary                boot
 2      3949GB  4001GB  52.2GB  extended
TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Disk /dev/sde - 500 GB / 465 GiB - CHS 7600 255 63

The harddisk (500 GB / 465 GiB) seems too small! (< 15 TB / 13 TiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partitions can't be recovered:
     Partition               Start        End    Size in sectors
>  Linux                 1144  87 32  8645  91 22  120503808
   Linux                 1144 148 29  8645 152 19  120503808
   Linux                 1144 172 53  8645 176 43  120503808
   Linux                 1144 217 34  8645 221 24  120503808
   Linux                 1144 221 38  8645 225 28  120503808
   Linux                 1145 145 25  8646 149 15  120503808
   Linux                 1145 202 18  8646 206  8  120503808
   Linux                 1145 234 50  8646 238 40  120503808
   HPFS - NTFS          203486  30 44 230431  25 50  432871117
   HPFS - NTFS          203518 253 43 230463 248 49  432871117

[ Continue ]
ext4 blocksize=4096 Large_file Sparse_SB Recover, 493 GB / 459 GiB

答案1

分区表似乎是为 512 字节的扇区大小创建的,但是,磁盘的逻辑扇区大小是 4096 字节。这种情况有时会发生在模拟错误逻辑扇区大小的 USB 存储设备上,或者使用dd具有不同扇区大小的设备进行完整复制时。

您可以使用以下方法解决它losetup

losetup --find --show --partscan --sector-size=512 /dev/sde

然后查看生成的循环设备是否有可用的分区。

为了正确修复,您必须使用新的扇区大小重新创建分区表。循环设备应该有助于打印正确的分区偏移量和大小(以字节为单位)。

相关内容