Saturday, August 18, 2007

Fix the boot sector problem of partitions

Yesterday when I ran mkbt program from BartPE, it accidentlly modified the boot sector of my data partition D on hard disk-- a NTFS partition of about 40GB size. Today after I reboot the computer, the file system of partition D is displayed as 'RAW'. And every time when I click on it, Windows ask if I want to format the drive. I click NO absolutely.

The partition's first sector is also known as the boot sector. When the MBR is for entire drive, the boot sector is for an individual partition: like the MBR, the boot sector contains information that the system needs to locate the materials that are necessary to access the partition. A corrupt or missing boot sector is a serious problem. Without it the partition can not be accessed.

However, since mkbt only wrote stuffs to the first sector of partition D, all other sectors are intact. I guess there must be a way to fix the boot sector. Actually I found a couple ways:
  • Fixboot command of the Windows XP Recovery Console: Use it to write the new Windows boot sector code on the system partition. This command fixes damage in the Windows boot sector. The fixboot command is supported only on x86-based computers. I tried using "fixboot d:" in recovery console.
  • Commercial softwares sucn as PTDD Parition table doctor. It also has a fixboot command in parition operation menu.
After the new boot sector is written to partition D by fixboot, the partition can be recognized by windows again as a NTFS volume.

No comments: