Repair PBR by TestDisk
Repairing Partition Boot Record

TestDisk is an exceptional tool for reparing boot sector.
It is not only MBR but also can repair PBR.

If PBR has some troubles, OS cannot access to this partition.
And also if it is an active partition, Windows will not be able to boot.

Therefore, repairing PBR often becomes hard work but TestDisk can achieve it easier.

Two important sectors for recovering the partition

The information regarding partitions are not written somewhere file.
Basically, they are written in the one sector called "boot sector". *With the exception of GPT.

There are two main types of boot sectors - One is MBR(Master Boot Record) which is top of the disk and the other is PBR(Partition Boot Record) which is top of the partition.
PC can recognize the partition only after both sectors become normal condition.

TestDisk can repair MBR and PBR both.

PBR operation with using TestDisk

I will pursue the subject that you understand the following page in the premise.

How to use TestDisk

It is written about how to get it and basic operation procedure.
But this is compiled about reparing partition table mainly.
On the other hand, in this page, I will explain about the partition cannot restore only by reparing partition table.

First, choose "Advanced" at main menu of TestDisk.
Continuously, choose the restoration partition with using up/down arrow keys, then choose "Boot".

From here, you can operate about PBR of the partition you choose.
If it is clear that PBR is corrupt and it is recognized by TestDisk, sometimes happens that this screen will be displayed automatically when choosing "Write" after "Analyse".

According to the example image above, boot sector is "Status: Bad" meaning is corrupt and backup boot sector is "Status: OK" - they show that both sides are not identical.
Backup boot sector is really the copy of PBR and in the case of NTFS partition, they exist at last sector of each partition. *Reference: Microsoft Support

Here, I will provide an additional explanation about how to read the screen.
"BS" stands for "Boot Sector".
Additionally, the term boot sector here is PBR. *Microsoft names boot sector only PBR.

As long as checking on the screen, since backup boot sector became "Status: OK", it seems to be able to restore if write it into PBR.
For that reason, choose "Backup BS".

As a note of caution, if PBR is incorrect, TestDisk sometimes consider it to be "Status: OK".
Then, TestDisk will be successful completion but restoration is not done.
Users need to get direct confirmation of PBR and figure out if PBR is correct or not. *You can confirm it by choosing "Dump".

When "Status: Bad" is displayed, PBR has arguably something faults but the indication "Status: OK" had better to read only half believe.

Indication of "Status: OK"

"Status: OK" which TestDisk displays is only maintain the appearance of as PBR, not indicate the content is compatible for actual partitions.

For example, if using each type of partition editing tool(including imaging backup software), it might operate normally with PBR and backup are not identical.
*That means, "Sectors are not identical" but "Status: OK".
Then some troubles occur and backup is "Status: OK", so if overwriting the PBR by backup, the partition will not be recognized.
Because the backup content of PBR is different from current partition.

When the partition are formatted by Windows, backup of PBR will be created.
You need special attention if partitions have been changed since partition editing tool sometimes takes no notice about backup boot sector.

About "Rebuild BS"

PBR can be rebuilt by using "Rebuild BS" in the case of PBR is currupt and backup cannot use.

But "Rebuild BS" is last resort.
Because it is a irreversible operation to overwrite with new made data.
If you have to use "Rebuild BS", you should think back on why has become such a situation.

Additionally, "Rebuld BS" can rebuild only for disk parameter.
As concerns bootstrap loader, it takes over current value and that overwrites backup with rebuilding PBR.
If PBR of boot partition is corrupt, bootstrap loader needs to be repaired.

This is a confirmation screen whether it will overwrite backup boot sector on PBR is OK or not.
If it is no problem with overwriting, press "Y" key.

Boot sector, means PBR also became "Status: OK".

Then this menu screen is no longer in use, so choose "Quite".

The message requires reboot appears and done.
Confirm the partition after reboot.

Relationship between PBR and disk geometry

If PBR is corrupt, TestDisk might be false recognition about geometry.
This will be displayed during the execution of TestDisk and for example while "Analyse" is running, indication like

Warning: Bad ending head (CHS and LBA don't match)

appears. *And also "Bad ending sector" or "Bad ending cylinder" are same meanings.
The end position of CHS based on it and non-related LBA are not identical since it have recognized falsely disk geometry.

Because of the information regarding disk geometry saved in PBR, TestDisk recognizes falsely it. *sector size、number of sectors/track、number of heads etc.
For that reason, in the case of PBR has been corrupt, the probability of false recognition of the geometry will increase.

Similarly, the following indication is shown in some cases.

Warning: Incorrect number of heads/cylinder 255 (NTFS) != 16 (HD)

The value of left side is written in PBR and the right side one is recognized by TestDisk - so that meaning there are not identical.

If recognition value of TestDisk is obviously strange and modifying it, you need to choose "Geometry" from mein menu at TestDisk and change geometry manually.
Because this is a just operational parameter, so if you change the value at "Geometry", someting is not written to hard drive immediately.

It is important to change the geometry that TestDisk is recognized, but more important thing is why TestDisk recognizes falsely the geometry and figuring out what causes.
They are in most cases,

I think any one of above becomes the cause.