如何手动修复分区表?

jwa*_*ell 10 partitioning dual-boot mbr

我最近在笔记本电脑上的 MBR/分区表上遇到了问题。我设法使用 testdisk 重建分区表,并安装 GRUB 以使其再次正常启动(我使用的是 Windows 7 的双启动)。但是,由于出现错误,我无法再正确运行 gparted Can't have a partition outside the disk!

fdisk -l 输出如下所示:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x188f12a9

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         154     1228800    7  HPFS/NTFS/exFAT
/dev/sda2             154       13446   106775171    7  HPFS/NTFS/exFAT
/dev/sda3           13447       28745   122880000   83  Linux
/dev/sda4           28745       30402    13317664+   f  W95 Ext'd (LBA)
/dev/sda5           28745       29127     3069944   82  Linux swap / Solaris
/dev/sda6           29127       30402    10240000    7  HPFS/NTFS/exFAT
Run Code Online (Sandbox Code Playgroud)

所以磁盘有30401 cylinders,但sda6结束于cylinder 30402; 大概这就是问题所在。

当我运行 testdisk 时,它的第 6 个分区以 结尾cylinder 30401,但将其写入分区表没有任何区别。

有没有简单的方法来解决这个问题?

我在别处读到我可以通过手动编辑分区表来解决这个问题,但我想要非常具体的说明,因为我对这个领域不太了解!

psu*_*usi 12

使用 fdisk。使用u命令将其置于扇区模式,然后p打印表,d删除分区,然后n重新创建它。重新创建它时,使用相同的起始扇区,但使用实际适合磁盘的结束扇区。完成并仔细检查(p再次)后,保存并退出w