The volume boot code exists on every partition where the volume boot record exists, which is every formatted partition. However, it’s only called upon by the master boot code for the primary partition that’s set as active. Otherwise, for non-active partitions, the volume boot code remains unused. Volume boot codes are specific to the operating system on that particular partition. For example, a volume boot code for Windows 10 may function differently than one for a flavor of Linux or even a different version of Windows like Windows XP or Windows 7.
What the Volume Boot Code Does
The master boot record searches for a bootable device in whichever boot sequence/order is set by BIOS. Once a relevant device is found, like a hard drive, the volume boot code is responsible for loading the proper files that starts the operating system. For Windows 10 through Windows Vista, it’s the Windows Boot Manager (BOOTMGR) that actually loads the operating system. For older versions of Windows, like Windows XP, it’s the NT Loader (NTLDR) that the volume boot code uses to start the operating system. In either case, the volume boot code finds the correct data to move the boot process onward. You can see here when the volume boot code is used in a typical process in which the OS is loaded from a hard drive:
Volume Boot Code Errors
As you can see above, there are many components that make up the total process during which the operating system can ultimately be loaded. This means there are many instances when an error can be thrown, and therefore different issues that could cause specific error messages. A corrupt volume boot code usually results in hal.dll errors like:
Cannot find \Windows\System32\hal.dllWindows could not start because the following file is missing or corrupt: C:\Windows\system32\hal.dll. Please re-install a copy of the above file.
Those kinds of volume boot code errors can be fixed with the bootsect command, one of the many Command Prompt commands available in Windows. See How to Use Bootsect to Update the Volume Boot Code to BOOTMGR if you need help with that. In Step 4 above, if the attempt to find an active partition fails, you might see an error like “No boot device.” It’s clear at the point the error occurs that it’s not due to the volume boot code. It’s possible that there either isn’t a properly formatted partition on that hard drive or that BIOS is looking at the wrong device, in which case you can change the boot order to the correct device like the hard drive (instead of a disc or external hard drive, for example).