About Contribute Disclaimer Contact News
The information on this site is offered in good faith and no responsibility can be accepted for misuse that leads to loss of data or damaged hardware.
Help Us Improve
Have you spotted an error, or found something confusing or ambiguous? Help us improve our articles......

Google Advert Links
tech insight guyTech Insight
Explaining it in plain language.
spacer Multibooters.com

Windows Boot Files - bootmgr and BCD

How they do their job of finding the Windows bootloader winload.exe

finding windows graphic

Windows operating systems since Vista have some new boot files called bootmgr and BCD which operate in a completely different manner to the files that they replace. If you have ever worked with the ntldr and the boot.ini of the previous generation of Windows then you may know that the ntldr will use the motherboard’s firmware (the bios) to find the location of a hard drive. It will then look at the partition table on that hard drive to find the partition of its target operating system. The new boot files use neither of these methods to locate Windows

In versions of the Windows NT operating system up to XP (legacy Windows) the three main boot files on a common PC are ntldr, Ntdetect.com and boot.ini and all three are in the root of the active primary partition of the boot hard drive - the System partition. In new Windows these three files are replaced with bootmgr, BCD and winload.exe, but only bootmgr and BCD stay in the root of the System partition and winload.exe now resides in the Windows/system32 folder of the Boot partition, (the System and Boot partitions can often be the same). The BCD file (Boot Configuration Data) has replaced the boot.ini file. The bootmanager function that was a part of ntldr is now carried out by bootmgr. The other functions of ntldr and those of Ntdetect.com of setting up the correct environment for Windows are now both carried out by winload.exe. From this point onwards the boot process remains the same with the bootloaders (ntldr or winload) starting the operating system by loading ntoskrnl.exe, hal.dll and the System registry hive from the Windows/System32 directory.

Finding Their Target.
In legacy Windows the ntldr reads information from the boot.ini file to help it find the correct hard drive and partition of the operating system that it wants to start. A typical line in the boot.ini for a common PC may look like this - multi(0)disk(0)rdisk(0)partition(1)\WINDOWS........ The ntldr knows from the information here that it has to go to partition number one on hard drive zero. The ntldr then consults the computer's firmware (BIOS) to find out which hard drive is considered to be drive zero, then it looks at the partition table on that drive to find out which partition is number one. Once it knows the partition it can then find the system32 folder of the Windows operating system that it wants to start. Similarly in new Windows the bootmgr looks in the BCD file for the information that it needs to find the correct drive and partition, but it does not then use the firmware to find the hard drive, or the partition table to find the partition. Instead it uses the unique Disk Signature of a hard drive and the partition offset (starting sector) of a partition.

Inside the BCD file, (or BCD store) each bootable item is in its own little container (Object) and these Objects will hold details of the disk signature of the hard drive and the offset of the partition where an item is located. Each boot Object is tagged with an alpha/numeric number called a GUID number and when bootmgr is asked to start something it finds the correct Object by its GUID number and then reads the disk signature and partition offset information that is contained in that Object. The bootmgr program then scans all the connected hard drives until it finds the one with the signature it wants, then jumps straight to the desired sector on that drive. The BIOS is not consulted to find the hard drive because bootmgr is not looking for a physical number of a drive but just scanning all drives for a specific disk signature. The partition table on the drive does not have to be consulted to find the partition because bootmgr has been given its offset and so already knows its exact starting position on the drive.
BCD Side Effects
The way that Windows Hibernation and Hybrid Sleep use the BCD results in it being opened and held open while Windows is running. When using Windows' own boot manager this presents no problem because there will only be one BCD on a PC and no confusion as to which BCD should be opened. When using a different bootmanager to boot various Windows operating systems there can be a BCD for each install and it can easily happen that the wrong BCD is loaded into Windows. info iconHibernation and the Wrong BCD
hibernate grafic
Is This Better?
In some respects this new method could be seen as an improvement on how the ntldr locates a drive and partition. It means that Windows is not wholly dependent on the configuration of drives and partitions remaining completely static. A change to the position number of a partition, which can occur when deleting or adding other partitions on a hard drive, won't affect bootmgr's ability to find a partition who's starting offset has not been moved. Likewise when adding, removing or moving hard drives as long as the boot hard drive with the System partition remains the boot hard drive, then any other drive will still be found by its disk signature no matter how the physical or channel position may have changed.

Moving Windows.
There is however a downside to this new scheme when we want to move an install of Windows to another partition or hard drive. If either the disk signature or partition offset no longer matches those that were written into the BCD Object for an operating system then bootmgr will be unable to find its target and will throw up an error message saying that a device is inaccessible or that winload.exe can't be found or started.

It is possible to manually update the BCD with new information, or to replace an incorrect disk signature, or to move a partition's offset, but they are all more involved than the minor edit of the boot.ini text file that would have done the job in legacy Windows. For very simple and native Microsoft configurations there is the Windows automatic Start-up Repair feature which may be able to update a BCD for you. There are also a couple of apps that can make life easier, and there is even a great workaround for the more experienced and adventurous multibooters, so for most people there is a workable solution to the problem. To learn more on this and for links to the various solutions, we suggest you begin here.....info iconThe Windows Hard Drive Disk Signature



up arrowTop of page....
spacermultibooters.com: June 2012 - - Last reviewed or updated: Feb 2013


multibooters logo multibooters.com
creative commons licence

All product and company logos, icons and images that are reproduced on this site are the property and trademarks of their respective owners and are used here merely to illustrate their products, NOT to indicate or infer any endorsement or partnership unless otherwise stated. We have endeavored not to reproduce copyrighted images or graphics or infringe upon the rights of any trademark or copyright holder. If you believe or suspect we may have breached the permissible use of copyrighted material then please bring it to our attention. The reproducing or copying of original material from this site is currently allowed for non commercial purposes with the provision that your source is clearly indicated and that a back-link to the referenced information is included. Thank You. See our full  Terms of Use.  Material on this site is not guaranteed to be free of errors.   Multibooters.com   2012 - 2013

Home Sitemap Privacy-Policy About Contact/Feedback Donate Copyright/Legal