On MBR partitioned disks information about primary partitions and extended partitions is contained in the Partition Table, a 64-byte data structure, located in the same sector as the Master Boot Record (Sector #0).
The Partition Table conforms to a standard layout, which is independent of the operating system. The last two bytes in the sector are a signature word for the sector and are always 0x55AA.
For our example disk layout we have a Partition Table that looks like:
Physical Sector: Sector #0 0000001B0 80 01 ..............?. 0000001C0 01 00 07 FE 7F 3E 3F 00 00 00 40 32 4E 00 00 00 ...?>?...@2N... 0000001D0 41 3F 06 FE 7F 64 7F 32 4E 00 A6 50 09 00 00 00 A?.?d2N.¦P.... 0000001E0 41 65 0F FE BF 4A 25 83 57 00 66 61 38 00 00 00 Ae.??J%?W.fa8... 0000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U?
We can see three existing partition entries and one empty entry:
Each Partition Table entry is 16 bytes long, making a maximum of four entries available. Each partition entry has fields for:
From this information the MBR loader can determine the location and size of partitions. The MBR loader looks for the "active" partition, i.e. the partition that has the Boot Indicator equal to 0x80 (the first one in our case) and passes control to the partition boot sector for further loading.
In our sample computer, we will remove the Boot Indicator from the first partition:
0000001B0 00 01 ................ 0000001C0 01 00 07 FE 7F 3E 3F 00 00 00 40 32 4E 00 00 00 ...?>?...@2N...
When we try to boot with this change to the Partition Table, we see an error message like Operating System not found. This tells us that the loader cannot determine which partition contains the active operating system and therefore does not know where to pass control to.
This could happen if utility like FDISK was used, but marked an improper partition active.
The loader will try to boot from the indicated partition and will fail. It will try to boot again from other devices like the floppy, USB or CD/DVD-ROM. If this attempt fails to boot, there will be an error message like Non-System Disk or Disk Error.
If the partition entry has been deleted, the following two partitions will move one line up in the partition table.
Physical Sector: Sector #0 0000001B0 80 00 ..............?. 0000001C0 41 3F 06 FE 7F 64 7F 32 4E 00 A6 50 09 00 00 00 A?.?d2N.¦P.... 0000001D0 41 65 0F FE BF 4A 25 83 57 00 66 61 38 00 00 00 Ae.??J%?W.fa8... 0000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U?
In the Partition Table above, we have removed the partition entry. If we try to boot now, the second (FAT) partition will be read as the first (Active) and the loader will try to boot from it. If the second partition is not a system partition, we will get the same error messages as in the previous example.
In our example Partition Table, we will write zeros to the location of the first partition entry to simulate a damaged entry.
Physical Sector: Sector #0 0000001B0 80 00 ..............?. 0000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000001D0 41 3F 06 FE 7F 64 7F 32 4E 00 A6 50 09 00 00 00 A?.?d2N.¦P.... 0000001E0 41 65 0F FE BF 4A 25 83 57 00 66 61 38 00 00 00 Ae.??J%?W.fa8... 0000001F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 55 AA ..............U?
If we try to boot now, the MBR loader will try to read and interpret zeros as partition parameters. (The zeros are simulating a damaged entry that could be other garbage or random characters.) The error message that appears will be Missing Operating System.
This is the reason why the second step in partition recovery is to run Disk Viewer to make sure that the proper partition exists in the partition table and has been set as an Active.
A recovery utility will automate these methods of discovery as follows:
If data recovery software finds the Partition Boot Sector, all necessary parameters to reconstruct partition entries can be found here. (see Partition Boot Sector topic for details).
To further describe this case, the original partition entry is replaced by a new re-constructed one. All file partitions work fine and drive operation continues until, at a later date, someone recalls missing some important data from the original partition. If Master Boot Record, Partition Table, Volume Sectors backup was created before partition re-construction (Active@ Partition Recovery can do it), you can virtually restore the old, damaged partition entry and look for your data (provided it has not been overwritten with new data yet). Some advanced recovery tools (like Active@ File Recovery also have the ability to scan the disks' entire surface and try to reconstruct the previously deleted partition information from the residual data remaining from the previous partition (i.e. perform virtual partition recovery).