A Guide to the Multiboot Process
The XP and Vista boot process in general.
I have learned from experience that most people will consider the computer boot sequence as something that is almost beyond their comprehension. Many guides or examinations are often overly technical and will just confuse the issue even further, or sap the reader's will to live. This guide will try to explain only what you really need to know. I believe it is not necessary to understand the finer details of everything that is going on, that simply being aware of the general flow of the boot sequence is more than enough to allow you to make the correct choices when setting up or reconfiguring your multiboot system. What follows may seem over simplified, but it is just about all you really need to understand.
The boot process is one small program doing its job and then starting the next program in the sequence. Typically there will be either 4 or 5 small programs, the last being the one that actually starts the operating system. Most problems arise quite simply because one program cannot find the next one in the chain. If you know where each program is, which one it needs to find next, then if necessary point it to that next program, then you have mastered multibooting. There’s nothing really complicated or mystical about it. We really are talking about a few small programs that have to start in the correct order. Anyone who has used a computer for more than 5 minutes will know what programs are and will be perfectly comfortable using them. The boot sequence programs hold no secrets or magical powers, they are just like any other program, coded ones and zeros that tell the computer what to do. Some do have strange names that have almost passed into legend and are often uttered with a sense of reverence and wonderment. They conjure up visions of unknowable secrets, even among some seasoned IT pros. I don’t want to shatter anyone’s beliefs, but here is the truth.
The first program is built into your computer's motherboard. It is on a small chip and so is always in the same place so that when the computer is turned on it knows where to find it. This program is called the BIOS. It will do its job and then look for and start the next program. The BIOS is pretty clever and can actually search for the next program and look in various places for it. Normally it will find it all by itself, so you don’t usually have to do anything, but you do have the option if need be of setting the BIOS boot order so that it will look in the place you want it to – floppy, CD, hard drive, etc.
If you are booting an OS on the hard drive then the next program is, unsurprisingly, on the hard drive. To make it easy for the bios to find the second program it is always put in the same place and the bios will only look in that place. It is always right at the very beginning of the drive, starting on the first bytes of the very first sector. This program is commonly called the MBR (Master Boot Record), but this is a little misleading because the MBR is actually the bootprogram and the partition table. The most common name for the bootprogram part of the MBR is the Initial Program Loader (IPL). Just like the BIOS program the IPL is often not specific to any OS, so it won't care if it’s Windows or Linux that is on the hard drive, it only wants to start the next little program. The Microsoft IPL is very small and quite limited and its main job is just to find and start that next program in the chain. It looks at the partition table to see if any of the entries there is waving a flag in the air and shouting - Pick Me! If the IPL sees a partition that is pointing to itself then it goes to the first bytes of that partition and starts the little program that it finds there. If you take the flag away from one partition and give it to another then the IPL will then pick that partition and start that one’s little program. When you move the flag you are not changing anything else about a partition or its details in the partition table, you are literally just moving a pointer that tells the IPL which partition to pick. The partition with the flag is called the Active partition, so changing or setting the active partition is simply moving a pointer, (the correct tech-speak is actually flag).
The third little program in the chain is at the very beginning of the partition. This one is called the PBR (partition boot record) or in some cases it can be called the VBR (volume boot record). Now the PBR will do its job and then start the next program. However, unlike the BIOS and IPL, the PBR is operating system specific and needs to know the name and location of the file it has to start. This next file will be different for various operating systems, so during the install of an OS the PBR will be written with the information necessary to find the correct file. For WinNT before Vista this will be ntldr, which will always just be in the root of the partition. That is it will not be inside any folder or directory, but just right there on its own, next to the Windows and Program Files folders.
For all WinNT before Vista the ntldr will be the 4th and last program in the boot sequence chain. It's called the bootloader and it is the one that does the actual job of starting Windows from the System32 folder. (The ntldr also has the auxiliary function of a bootmanager which can with the aid of a partition list held in the boot.ini start a Windows OS on a different partition to the one it is itself on).
For Win 2K/XP etc the boot sequence is:- BIOS - IPL - PBR - ntldr - Windows
The Vista and Win7 boot sequence is slightly different because ntldr has been superseded. In old WinNT the ntldr was both bootmanager and bootloader, but from Vista these two functions have been separated out into two different programs. The bootmanager function of finding and selecting the OS to be started is now called bootmgr. The bootloader function of actually starting the OS is now a new file called winload.exe. The bootmgr program stays in the root of the partition and winload.exe has been placed inside the System32 folder alongside the Windows OS it has to start. This has added an extra step to the boot sequence chain, so in Vista it is the 5th program that starts Windows.
Vista boot sequence:- BIOS - IPL - PBR - bootmgr - winload.exe - Windows.
If you install Vista to a computer that already has a legacy WinNT installed on it and you don't take precautions to the contrary, then the Microsoft bootmanager will be automatically configured for dual booting. The previous Windows install will be modified to accommodate the method of operation necessary for bootmgr and ntldr to coexist. The boot sequence for Vista will be just as it was in the example above when Vista was the only OS on the hard drive. The same 5 programs run in the same order.
Vista dual boot sequence:- BIOS - IPL - PBR - bootmgr - winload.exe - Windows.
Notice however that the Vista install has placed bootmgr and the BCD file on the partition of the previous Windows install. Also that the XP partition's PBR has been replaced with a Vista one, so that it knows to look for bootmgr instead of ntldr. On bootup it will be bootmgr that will halt the process and offer the boot menu. On selecting Vista, bootmgr will jump directly to winload.exe in the Vista System32 folder, skipping the Vista partition PBR. The Vista partition may or may not get a valid PBR but this won’t be used anyway as part of the boot sequence chain. If you did at this point change the Active partition so the IPL would directly start the Vista partition's PBR, you would just get an error message that something was missing.
When you select the XP install from the dual boot menu the boot process will have changed slightly from the sole XP install shown above because bootmgr will have inserted itself in the chain. This adds an extra step and so XP now also has 5 programs in the sequence.
XP dual boot sequence:- BIOS - IPL - PBR - bootmgr - ntldr - Windows.
If you already have a Windows dualboot and then add Vista as a third OS then you will not get three choices from the new Vista boot menu, because the original ntldr will continue to be used to select which of the old OSes to boot. Each of the bootmanagers in the chain will offer separate boot menus. Vista's bootmgr will offer 2 choices of Vista and previous OSes, then ntldr will display your original boot menu. Overall the multiboot sequence is no different to the dualboot one. Both bootmgr and ntldr will always be on the active partition of the boot hard drive and both will ignore PBRs and jump directly to Windows in the System32 folder. (The ntldr has also always skipped PBRs).
In the example below the sequence for the first and third partitions will be as the last two examples above. The middle partition Windows will be started as it originally was by the ntldr on the active first partition, except of course with bootmgr now in the chain.
Sequence for all old WinNT is the same:- BIOS - IPL - PBR - bootmgr - ntldr - Windows.
No matter how many Windows OSes or hard drives you have the boot sequence will always be the same and only the boot drive active partition will have an ntldr and bootmgr, through which all the others must be booted. Each Vista and will be started by bootmgr and each of the older WinNT will be started by ntldr.
Vista sequence is the same as always:- BIOS - IPL - PBR - bootmgr - winload - Windows
With no ntldr or bootmgr on the second hard drive then it cannot be made the boot drive in the computer and have any of its OSes directly started. An install of Vista to a second or higher drive will only write a Vista IPL to that drive's MBR if there is no IPL already present, so an older WinNT IPL will be left in place. If you do need to get such a drive to be bootable then any Windows IPL since Win9x is capable of starting a Vista PBR. The main thing to be aware of is that there might not be any partitions on the drive flagged as active, so the IPL will stall when it does not know where to look for a PBR.
Vista partitions on any hard drive might not actually have valid Vista PBRs which have been written correctly to look for bootmgr. If a PBR was present on the partition during the Vista install then it may be left in place. I haven’t tested all scenarios but an old WinNT PBR on an NTFS partition always seems to be left alone, which of course will point to ntldr instead of bootmgr. If you want to avoid this either make sure the partition is not formatted before the Vista install and so won't have a PBR, or format it only from Vista.
Microsoft calls the all important active partition on the boot drive the System partition. Perhaps they choose to call it this because it holds complete control over your entire system. Lose the system partition and you lose your whole system. From now on I will refer to this active partition as the System Partition.
Once you have a grasp of how the boot sequence chain progresses then you should be able to see what will break the chain and so have a much better awareness of what you can and cannot do. You obviously cannot format the system partition and do a fresh install of any OS there without losing all the other boot options. A fresh install on the system partition will not detect anything that has gone before and so will not configure the bootmanager to include any of the other OSes on the computer. You also can't install or reinstall old WinNT on any of the other partitions as this will rewrite the system partition PBR to look for ntldr, which will mean the boot sequence chain of any Vista install will be broken. You should be able to reinstall a Vista to any of the other partitions as this will reuse any current bootmgr and ntldr it finds on the system partition.
Perhaps you can now understand why Microsoft say you have to install your operating systems in the order of the oldest first. A newer OS will ensure the changes it makes to the boot components on the system partition are backward compatible for all the older OSes. With Vista that change should be obvious to you now, for Windows 2000, XP and 2003 it is the ntldr that causes the problem, as a fresh or repair install of Windows will always replace any existing ntldr on the system partition with its own, which won't be forward compatible to the newer Windows OSes. The 2K ntldr cannot boot XP and the XP one cannot boot 2003. When it comes to Win9x it is a somewhat different situation for a dual or multiboot set up. You can only natively have one install of Win9x on the computer when using the Microsoft bootmanager and this install has to be on the system partition. So obviously you will have major problems trying to do this and retain any current dual or multiboot arrangement. (I'm not covering Win9x here as there are plenty of other guides around for that and this guide is long enough already).
Repairing a broken boot sequence chain can often be done with tools on the Windows CD or Vista DVD. The more complex the multiboot you have the less likely these tools will be successful in doing it all for you. I've found they only seem to be able to handle simple and common setups. You may have to resort to doing it manually and this is not always straight forward, especially with the new BCD in Vista. I'm not going to cover how to do any of this because I would probably end up being the one who would lose the will to live. Besides, I would have to research much of it again as I gave up doing such things many years ago. There are other easier ways that can produce a system that is more flexible, reliable and infinitely simpler to manage and reconfigure.
I Don't Think I Should
There is a general belief that multibooting is difficult and can cause you so many problems and headaches that it is just not worth the effort or the risk. If you have understood this article till now then you should certainly be able to see the many problems that could be encountered when using the Microsoft bootmanager with its requirement of a single system partition. I believe most people's misgivings about multibooting stem from the fact that the boot process is generally a mystery to them and so they don't want to mess with something they don’t understand. The purpose of this article is to try and illuminate the subject and hopefully give you an understanding of what is actually going on. With that knowledge I hope you will see that multibooting need not be as hard as Microsoft has made it.
The cleanest way to multiboot would be to have an IPL that allows you to choose which PBR you would like to start next in the boot sequence. If each Windows install has its own specific PBR and its own ntldr or bootmgr on its own partition, then each install of Windows can be booted just as it would be if it were the only OS on the computer.
Above shows the IPL starting the PBR of the XP install on the second partition of the hard drive. Each Windows install on the drive is entirely independent and has no links to a system partition or a bootmanager that is inside another OS. All are started by their own PBR and each one has an ntldr or bootmgr that is set to only start its own OS. The immediate advantage of this is that you can do whatever you like with each OS without affecting any other. You can make changes on one partition without breaking the boot sequence chain of others, so you can install or reinstall any Windows OS in any order you like. You can image and clone individual Windows installs without having to worry about how they are connected to a system partition. If you use a clever enough IPL you can start any PBR on any hard drive and if you put that IPL in the MBR of every hard drive then you can swap drives around and still immediately boot any OS on your computer.
The lack of a system partition means that drive letters will no longer be jumbled and you won’t have a drive showing that you can’t remove or change the letter of. All Windows installs will see themselves as the C: drive and you can set your common data partition to whatever next letter you prefer. If you set this the same in each of your Windows then no matter which one you are booted into you will always know that Windows is C: and your data partition is D: or E: or whatever.
When you install a Windows OS it will rather inconveniently always write a new IPL into the MBR, which means that you will have to reinstall your MBR boot manager. This can usually be done from the desktop in your new Windows or from the other available means of floppy or CD. (Personally I will often replace the Windows IPL with my bootmanager at the first reboot during a Windows install). You should always make sure you have the ability to reinstall your bootmanager from other than inside Windows. If a Windows install fails for some reason and you can’t get to the desktop, then putting your bootmanager back on the drive from floppy or CD etc will restore access to all your other OSes.
The other common thing might be a computer manufacturer's recovery system being hooked into the Microsoft IPL, so that you can press a key at bootup and go to their recovery utility. Most times if you are multibooting you will have already disabled this feature by partitioning the hard drive or installing another OS. If you do currently have such a feature and wish to retain it then your options will be limited. Any changes to the IPL or original partition layout will most likely disable or damage it, perhaps beyond easy repair. It is not impossible in some cases to configure a multiboot system and retain the manufacturer's recovery facility, but you will need to be good and know what you are doing. There are many wildly different systems employed and new ones introduced with Vista that are still little examined. A better use of your time would be to organise your own backup and recovery system, which typically can be much more comprehensive and flexible.
There are also some third party recovery apps that hook into or change the IPL, so if you do use any rollback or system recovery software you should check how it operates or uninstall it. Norton’s GoBack is one example of software that changes the IPL and even the partition table, which can result in an unbootable system if the IPL is further altered.
Microsoft’s new BitLocker drive encryption system requires the Microsoft IPL for the secure boot process. Currently available third-party bootmanagers that change the IPL will disrupt the trusted sequence, but I've found in some circumstances supplying the bitlocker key at Vista boot will allow the changes to be accepted. There are other options and workarounds, but I’m sure most corporate machines running bitlocker won’t be multibooting and the few that are will be happy with Microsoft’s own bootmanager.
The size of the bootmanager partition shown above is of course not to any scale and in reality is usually very small. There are several of these types of bootmanagers around, each offering varying features. I've tested XOSL, BootMagic, Acronis OSS and BootIT-NG, all of which can work with Vista, but a couple have serious issues you need to be aware of. See the bootmanager page for specific details.
Inside a Current OS.
On a Floppy.
GAG can also be installed and reinstalled from its own boot CD, but like the floppy version it also makes an excellent recovery tool you can use when something has gone wrong. It is not really practical as a full time bootmanager because of the time it takes for the CD to load, plus you can’t save your set up and would have to configure it each time to add items to the boot menu.
Linux and Lilo/Grub
Boot sequence for a Windows OS when Lilo/Grub is in the MBR.
If you instead choose to have Lilo or Grub installed entirely to the Linux partition then you can use your preferred bootmanager to start Linux by way of its own PBR, in exactly the same way as you start independent Windows by their PBRs. It's a cleaner method of doing things and also removes the certainty of breaking the boot sequence chain to your Windows OSes if you later decide to reinstall or remove the Linux OS. Unlike Windows an independent Linux install will not overwrite your MBR bootmanager.
If you want to have more than three Windows OSes and an extended partition per hard drive then you will need to put Windows onto a logical partition. With Linux you are able to install a fully independent and stand alone OS directly to a logical partition or to a second or higher hard drive, because the Linux IPL is clever enough to be able to pass control to that OS. Unfortunately Microsoft have never introduced such abilities in their IPL and so have never seen the need to allow you to do a fully independent install of Windows to a logical partition or other drive. Their IPL can only work with primary partitions on its own boot hard drive, so if you want to install to anything other than one of these primaries then you can only do it by allowing a boot drive primary to become a system partition where ntldr or bootmgr will operate as a bootmanager. The Windows setup will simply refuse to continue if there is not a suitable boot drive primary that it can use.
This of course means that getting an independent install of Windows on a logical partition or another hard drive requires a little work around. For a second or higher hard drive it only requires making that drive the boot drive during the install. For a logical partition the easiest and cleanest way is to simply clone it there. See Dan Goodell's excellent guide to Booting Windows from an Extended Partition.The Windows logical partition PBR needs one small tweak to make it bootable, but you may not have to do this as many recent cloning tools will do it automatically and Vista and Win7 don't appear to require it. After cloning XP/2K etc you have to make a simple edit to the boot.ini file in notepad so that it points to the changed drive and/or partition. With Vista you have to edit the new BCD file, which is explained on the cloning page.