What Is a Boot Sector?

An explanation of boot sectors and related viruses

A boot sector is a physical sector, or section, on a hard drive that includes information about how to start the boot process in order to load an operating system.

A boot sector exists on an internal hard drive where an operating system like Windows is installed, as well as storage devices that you may not even need to boot from, but instead are just holding personal data, like an external hard drive, floppy disk, or another USB device.

Photo of a puzzle with a missing piece
Atilla ALTUN / E+ / Getty Images

How the Boot Sector Is Used

When a computer is powered on, the BIOS begins its boot process by searching for information on how to start the operating system. It does this by checking the first sector of each storage device connected to the computer.

Say you have one hard drive in your computer. This means you have one drive that has one boot sector. In that particular section of the hard drive may be one of two things: the master boot record (MBR) or the volume boot record (VBR).

The MBR is the very first sector of any formatted hard drive. Since BIOS looks at the first sector to understand how it should proceed, it will load the MBR into memory. Then, the active partition can be found so the computer knows where the operating system is located.

If a hard drive has multiple partitions, the VBR is the first sector within each partition. The VBR is also the first sector of a device that isn't partitioned at all.

Check out those MBR and VBR links above for more about the master boot record and volume boot records and how they work as part of the boot process.

Boot Sector Errors

A sector must have a very specific disk signature to be seen by BIOS as a boot sector. This signature is 0x55AA and is contained in its very last two bytes of information.

If the disk signature is corrupted or has somehow been changed, it’s very likely that BIOS won't be able to find the boot sector, and so, of course, won't load the necessary instructions for finding and starting the operating system.

Any of the following error messages could indicate a corrupted boot sector:

  • Invalid partition table
  • Couldn't find BOOTMGR
  • BOOTMGR is missing
  • Missing operating system
  • Setup has determined that your file system is corrupt
  • A disk read error occurred
  • NTLDR is missing
  • Error loading operating system

While one of these errors often indicates a boot sector problem, there could be other causes, with different solutions. Be sure to follow any specific troubleshooting advice you might find on our site or elsewhere.

How to Repair Boot Sector Errors

If you discover through your troubleshooting that a boot sector error is probably the cause of the problems you're experiencing, formatting the hard drive and then reinstalling Windows from scratch is the "classic" fix for these types of problems.

Fortunately, there are other, less destructive but well-established processes that anyone can follow that should repair the boot sector... no erasing-of-your-computer required.

To repair a damaged boot sector in Windows 11, 10, 8, 7, or Vista, follow our detailed tutorial on How to Write a New Partition Boot Sector in Windows.

These errors can also occur in Windows XP, but the fix-it process is very different. See our article How to Write a New Partition Boot Sector for Windows XP for the details.

One of the more official, Microsoft-sanctioned processes above are better bets in almost all cases, but there are some third-party tools that can rebuild boot sectors if you'd like to try one of them instead. See our list of Free Disk Partitioning Tools if you need a recommendation.

There are also some Commercial Hard Drive Testing Tools that advertise the ability to recover data from bad sectors, which might be one way to go about fixing the error, but we'd focus on the ideas we already mentioned before paying for one of these.

Boot Sector Viruses

Beyond running the risk of being corrupted by some sort of accident or hardware failure, the boot sector is also a common area for malware to take hold.

Malware makers love focusing their attention on the boot sector because its code is launched automatically and sometimes without protection before the operating system even starts up!

If you think you may have a boot sector virus, we highly recommend doing a complete scan for malware, making sure you're scanning the boot sector as well. See How to Scan Your Computer for Viruses and Other Malware for help if you're not sure what to do.

Many of these viruses will stop your computer from starting all the way, making scanning for malware from within Windows impossible. In these cases, you need a bootable virus scanner. We keep a list of free bootable antivirus tools that you can choose from, which solves this particularly frustrating catch-22.

Some motherboards have BIOS software that actively prevents boot sectors from being modified, very helpful in preventing malicious software from making changes to it. That said, this feature is probably disabled by default so partitioning tools and disk encryption programs will work properly, but it's worth enabling if you don't use those types of tools and have been dealing with boot sector virus issues.

More Information on Boot Sectors

The boot sector is created when you first format a device. This means if the device hasn't been formatted, and therefore isn’t using a file system, there also won’t be a boot sector.

There's only one boot sector per storage device. Even if one hard drive has multiple partitions, or is running more than one operating system, there is still only one for that whole drive.

Paid software, like Active@ Partition Recovery, is available that can back up and restore boot sector information in the event that you run into an issue. Other advanced applications may be able to find another boot sector on the drive that can be used to rebuild the corrupted one.

FAQ
  • What is the master boot code?

    The master boot code (MBC) is the part of the master boot record that performs the first steps in the booting process. After the master boot code is executed by BIOS, it hands off booting control to the volume boot code on the partition that contains the operating system.

  • What is the volume boot code?

    The volume boot code is called upon by the master boot code and is used to start the boot manager, which begins the actual loading of the operating system. The volume boot code and BIOS parameter block are the two major parts that make up the volume boot record/sector.

  • What is a rootkit virus?

    Rootkit virus is just another name for boot sector viruses. The terms are used interchangeably, and the steps for fixing a rootkit virus are the same as fixing a boot sector virus.

  • What is the Windows boot manager?

    Windows boot manager, or BOOTMGR, executes winload.exe, the system loader used as part of the Windows boot process. Boot Manager loads from the volume boot code, which is part of the volume boot record. You can change the Boot Manager settings to choose your default operating system.

Was this page helpful?