Hi, Ben.

I see. OK then, there is a short (but somewhat risky) way and long (but 
reliable) way. The short is just to ignore the damaged GPT by simply converting 
MBR into new GPT and hoping it would be all right. But I'd suggest to go 
risk-free.

Of course, backup of the partition table is always desirable. So, before 
starting, you can use
# dd if=/dev/sda of=/path/to/backup/file bs=512 count=34
for saving the MBR and primary GPT contents into file (backup GPT can be copied 
similarly, but its position is a bit difficult to fetch: it's stored in primary 
GPT itself in binary form; usually it's located within the last 33 sectors of 
the disk, but I'm not sure there is no aligning or something like that; you can 
backup the last megabyte or so of your disk to make sure).

1. After starting `gdisk /dev/sda' tell it to use GPT (variant 2).
2. Now enter recovery menu (r), load main GPT table (e) and print its contents 
(p).
3. Then load backup GPT table (c) and print it (p).
4. Compare all the 3 results: both GPT tables and MBR (printed earlier by 
parted -l). Now:
5a. If they are all identical, do nothing and go to p.6.
5b. If only one of GPT copies corresponds to the real partitioning structure, 
load the valid copy of GPT (c or e, as from pp. 2-3 given above).
5c. If both GPT copies are wrong, and only MBR is correct, regenerate GPT from 
MBR (f).
6. Now save the resulting partition table as GPT (w): it will repair the CRC, 
update both GPT copies and write the protective MBR to make it a valid GPT 
partitioning.




gdisk reports: Caution: invalid backup GPT header, but valid main header; 
regenerating backup header from main header.

Caution! After loading the partitions, the CRC doesn't check out!
   
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options 
on the recovery & transformation menu to examine the two tables.

Warning! One or more CRC's don't match. You should repair the disk!

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: damaged

Found valid MBR and corrupt GPT. Which do you want to use? (Using the same GPT 
MAY permit recovery of GPT data.)
1 - MBR
2 - GPT
3 - Create blank GPT

Your answer:

All this is the result of simply running gdisk>/dev/sda. And for what it's 
worth I haven't answered yet.


Thanks,

Ben

ben79

-------------------------------------------------------------------------

OM-QA Team



-- 
Bye.                                    With best regards,
                                        Konstantin Vlasov.
_______________________________________________
OM-Cooker mailing list
[email protected]
http://ml.openmandriva.org/listinfo.cgi/om-cooker-openmandriva.org

Reply via email to