问题:无法安装 4TB 驱动器。驱动器在 GParted 和 gdisk 中可见,但 GPT 分区报告为已损坏。
背景信息:最初,我的设置由 2 个存储设备组成。我的主驱动器是装有 Windows 10 的 SSD。我的辅助驱动器是 4TB HDD。此设置运行良好。我想偶尔运行 Linux,因此我安装了另一个 HDD。安装 Linux 时,我从 Windows SSD 上移除了 SATA 和电源,并将它们插入新 HDD。我只从 4TB HDD 上移除了 SATA 电缆。然后我继续安装 CentOS。最后重新连接 4TB HDD、SSD,并安装新的 SATA 电缆并将其连接到新 HDD。使用启动菜单,我能够在 Windows 10 和 Linux 安装之间切换。此时我注意到 4TB HDD 没有出现在 Windows 或 Linux 中。
技术信息:我无法使用磁盘分区在 Windows 中看到 4TB HDD。我可以在 Linux 中使用 gpart GUI 和命令行上的 gdisk 查看驱动器。驱动器在 gdisk 和 GParted 中看到 2 个分区。
使用 Gparted: 当驱动器被扫描时,我收到一个提示,标题为“Libparted Bug Found!”,文本为“读取 /dev/sda 时文件结束”。选项包括重试、取消或忽略。
当我按下忽略时,我收到一个提示,标题为“发现 Libparted Bug!”,文本为“主 GPT 表已损坏,但备份似乎正常,因此将使用它。”选项确定或取消。
使用 gdisk: GPT fdisk (gdisk) 版本 0.8.6
Type device filename, or press <Enter> to exit: /dev/sda
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged
****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Command (? for help): p
Disk /dev/sda: 7814037168 sectors, 3.6 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 07A40EF7-3F5A-42B8-BE06-6BC4D40492ED
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 7814037134
Partitions will be aligned on 8-sector boundaries
Total free space is 3693 sectors (1.8 MiB)
Number Start (sector) End (sector) Size Code Name
1 34 262177 128.0 MiB 0C01 Microsoft reserved part
2 264192 7814035455 3.6 TiB 0700 Basic data partition
Command (? for help): i
Partition number (1-2): 1
Partition GUID code: E3C9E316-0B5C-4DB8-817D-F92DF00215AE (Microsoft reserved)
Partition unique GUID: 07987030-5C4E-4936-9BCD-129C622C99DF
First sector: 34 (at 17.0 KiB)
Last sector: 262177 (at 128.0 MiB)
Partition size: 262144 sectors (128.0 MiB)
Attribute flags: 0000000000000000
Partition name: 'Microsoft reserved partition'
Command (? for help): i
Partition number (1-2): 2
Partition GUID code: EBD0A0A2-B9E5-4433-87C0-68B6B72699C7 (Microsoft basic data)
Partition unique GUID: 9A23AFCE-2382-4C1C-AC0B-F25E6428E4C4
First sector: 264192 (at 129.0 MiB)
Last sector: 7814035455 (at 3.6 TiB)
Partition size: 7813771264 sectors (3.6 TiB)
Attribute flags: 0000000000000000
Partition name: 'Basic data partition'
Command (? for help): v
Caution: Partition 1 doesn't begin on a 8-sector boundary. This may
result in degraded performance on some modern (2009 and later) hard disks.
Consult http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/
for information on disk alignment.
No problems found. 3693 free sectors (1.8 MiB) available in 2
segments, the largest of which is 2014 (1007.0 KiB) in size.
如何使用 gdisk 或 GParted 来修复损坏的 GPT 分区而不破坏驱动器上的数据?