
我正在嘗試修復 graid mini 1TB 外部硬碟上損壞的 GPT 分區表。這是 gdisk 的報告:
root@philippe-desktop:/home/philippe/thomasdisk# gdisk /dev/sdb
GPT fdisk (gdisk) version 0.8.8
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): ?
b back up GPT data to a file
c change a partition's name
d delete a partition
i show detailed information on a partition
l list known partition types
n add a new partition
o create a new empty GUID partition table (GPT)
p print the partition table
q quit without saving changes
r recovery and transformation options (experts only)
s sort partitions
t change a partition's type code
v verify disk
w write table to disk and exit
x extra functionality (experts only)
? print this menu
Command (? for help): v
No problems found. 262157 free sectors (128.0 MiB) available in 2
segments, the largest of which is 262151 (128.0 MiB) in size.
Command (? for help): p
Disk /dev/sdb: 1953546304 sectors, 931.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): FE2326A4-F411-489E-B0D9-D2D9EF21A00C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1953546270
Partitions will be aligned on 8-sector boundaries
Total free space is 262157 sectors (128.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 40 409639 200.0 MiB EF00 EFI System Partition
2 409640 1953284119 931.2 GiB AF00 G-RAID mini
Command (? for help):
據我了解,gdisk 能夠自動解決損壞問題,只需按一下w
即可修復我的磁碟,但我不確定(驗證)選項通常v
是否應該向我提出恢復選項。
我可以安全地去按w
嗎?我已經做了sgdisk -b backup.gpt /dev/sdb
ps:如果這個問題偏離主題,請將我重新導向到正確的網站
答案1
如果您花幾分鐘閱讀上面的輸出,您會發現gdisk
它告訴您要做什麼(它發現了問題:invalid main GPT header, but valid backup;
,並為您採取了行動:regenerating main header from backup!
。它還提出了建議:disk verification and recovery are STRONGLY recommended.
-- 您可能應該遵循建議) 。
基於驗證沒有傳回任何問題的事實,您可能可以正常寫出分割區佈局 - 我的理解是gdisk
將使用並寫出重新產生的 GPT 資料。
如果你想成為明確的在您的操作中,復原選單有一個選項可以使用備份GPT 標頭(重建/替換主GPT 標頭),您可以專門呼叫該標頭,這似乎是要採取的正確動作(前提是您看到的GPT 佈局)上面看起來很正常 - 否則你可能需要手動重建分割區佈局)。