REPAIR THE MASTER BOOT RECORD

Has a hard disk crash caused you to lose everything on your drive? There's still a chance that your data may have survived. A corrupted or missing Windows 98 master boot record (MBR) is typically the cause of this problem. If you know how to repair the MBR, there's a good chance you can recover your data.

BEFORE WE BEGIN

It's important to point out that the MBR isn't something that you should just play around with for kicks. Tampering with the MBR on a functional machine can often render the machine unusable.

Remember that as you make a change to the MBR or to another area of the hard disk, the change replaces the existing data. Doing so can make it much more difficult--if not impossible--to recover your hard disk if it turns out that the MBR isn't the problem.

ANATOMY OF A MASTER BOOT RECORD

The MBR consists of the code that's located on the first physical sector of a hard disk. It tells the computer how to work with the hard disk. For example, it tells the computer which partition is active, the type of partition, and the starting location on the hard disk.

The MBR is divided into five basic sections. Each of these sections contains specific information.

The first 139 bytes are the jump code. The code loads the MBR into memory. This section also performs such tasks as enabling the necessary interrupts, locating the C drive, and loading the boot sector from the C drive.

The next section contains some error messages. These error messages are crammed into the next 80 bytes and indicate such conditions as an invalid partition table or a bad (or missing) operating system.

The next 227 bytes are empty. The 64 bytes that follow outline the physical characteristics of the drive. This area is known as the partition table. The partition table defines such characteristics as the:

· Active partition
· Starting head
· Starting sector
· Starting cylinder
· Partition type
· Ending head
· Ending sector
· Ending cylinder
· Total number of sectors on the partition

The partition table varies widely among different size drives, partitions, and file systems. For example, a FAT16 partition table is much different from a FAT32 partition table.

The last two bytes of the MBR indicate the MBR's boundaries. They are nothing more than an end-of-file marker.