Fix GPT on Win7

4

3

I have a GPT partitioned HDD which isn't recoqnized by windows. The disk management shows the entire disk as unallocated.

I am 100% sure that the partitions and their file systems are undamaged.

TestDisk shows me this:

enter image description here

It finds the 128MB reserved space and the 2nd partition (it doesnt have a standard file system, thats why it shows "Basic data partition")

is there any tool (Windows or Linux) that i can use to repair the GPT so that windows recoqnizes it again?

x4rf41

Posted 2014-01-26T17:38:22.843

Reputation: 143

1You are already using the Tool that should be able to resolve the problem. There are others most are paid. Don't feel convertible making a specific product suggestion. – Ramhound – 2014-01-26T18:08:15.737

all the tools i have found can only repair the partitions, but i dont want to repair those, i want to repair the GPT header NOT the partitions. if you think testdisk can do that, can you please tell me how? because i dont seem to find the option – x4rf41 – 2014-01-26T18:18:25.640

Perhaps I am dense. The error message says exactly "bad GPT Partition, invalid signature" this indicates if you were to fix that partition the problem would be solved. – Ramhound – 2014-01-26T18:21:56.257

1Well, GPT is the format of the partiton table, the entries of the partition table are correct (the information testdisk shows is correct). but gpt consists of more than just the adresses of the partitions, therefore i probably need to rebuild the gpt header. but i dont know how and what exactly do you mean with "fix that partition"? – x4rf41 – 2014-01-26T18:56:08.830

Answers

6

Ramhound is confusing you. There's no partition to fix, here. It is the partition table that needs fixing.

Your master copy of the EFI partition table, stored in blocks #1 et seq. of your disc has, as the utility says, an invalid signature. The utility is therefore using the backup copy of the EFI partition table, that is (for optimal results) stored at the end of the disc, in its highest-numbered blocks.

The utility is reporting that the backup copy has two entries. One has the type "Microsoft Reserved" and the other has the type "Basic data". Neither of these mean "does not have a standard filesystem". Partition types don't imply filesystem types. (They control visibility to operating systems.) As the utility is telling you, the signatures that do imply filesystem types, variously stored in "superblock"s and "BIOS Parameter Blocks" within the partitions, are missing from both of those partitions.

For repairing:

  • The gpart command in FreeBSD has a recover subcommand that can copy the backup copy over to the main copy (or vice versa).
  • TestDisk can build an EFI partition table from scratch, using information such as in the screenshot, and rewrite it to disc.
  • gdisk, as mentioned in Milind R's answer, can repair the case of a corrupted main copy and a valid backup copy, as here.

Further reading

JdeBP

Posted 2014-01-26T17:38:22.843

Reputation: 23 855

This so much. I managed to save my partition table, but before that I used all kind of tools, which didn't provide the help that gdisk did. Once I knew that GPT has the backup it was easy to fix. – Timotei – 2016-07-08T06:26:03.180

1btw. the problem for me was an invalid checksum due to harddisk change (i actually used two HDDs from a raid10 to build a raid0) – x4rf41 – 2014-01-28T18:54:40.953

7

Use gdisk. It's rigorous and thorough about all the integrity checks. Allow it to detect bad GPT, and let it fix it. That might just do the job.

Milind R

Posted 2014-01-26T17:38:22.843

Reputation: 767