Howto: Dual-Boot Windows Vista and XP

Written by rob on December 23, 2006 – 11:50 am -

From what I’ve heard, the easiest way to dual-boot Vista and XP is to let Windows XP remain on its partition (assuming you already have XP installed and want to keep that installation), and then install Vista on another partition. Vista automatically creates the boot menu for you, and it works perfectly.

Unfortunately, I installed Vista when none of my other hard drives were connected (to try to prevent data loss). I also didn’t have any XP installs on the other hard drives that were worth booting. This left me with no automagically-working boot menu. So, I installed XP on a second hard drive, and then restored the Vista boot record by using the Vista install disc (so the computer wouldn’t just boot to XP). This got me back into Vista, but still no boot menu. What is a guy to do? Hit up Google.

I went through some of Google’s top entries. Most of them were complex procedures dealing with a utility called “bcdedit” that is run from the command line under Vista. Despite the complexity, I still tried it, but to no avail. Some more searching led me to a utility called VistaBootPRO, which promised to take the bcdedit procedure and make it easier. While it did make it as easy as a drop-down menu and the click of a button, it still failed to create a working boot entry. I also was led to a Microsoft Knowledge Base article that is dedicated to this particular topic (click here). It, however, did not help. It seems that few people actually understand the voodoo behind the new BCD that Vista uses instead of boot.ini. After browsing more forum posts and trying a combination of everything, I seem to have found the working formula. Below is the step-by-step guide to getting Vista and XP to dual-boot if you installed XP after Vista like so many of us did (especially when we realized that Vista can not sync with iPod).

  1. When you turn your computer on, does it boot into XP or Vista? If Vista, you can skip to step 7. If XP, then continued with step 2. (Note that even if it does boot Vista, no harm will be done by following the below steps, and you might as well do them if you want to make sure this procedure works. I haven’t tried doing the procedure without steps 2-6.)
  2. Insert your Windows Vista DVD into the computer. When prompted to press any key to boot from CD/DVD, do so. A Vista boot menu will come up asking you to select either the x86 or x64 installation; choose the one that pertains to your Vista install. From there, the setup will load, until you are finally presented with a box asking for language information. Confirm your language, then press OK. A new box will come up with the option to Install Vista Now. Do not choose that; instead, select Repair Installation at the bottom. It will search for Windows installs. It may or may not recognize the XP install, and it may or may not tell you that the install needs to repair. Cancel any box asking you to “repair and restart”, and simply choose your Windows Vista install in the box. Press OK, and then select “Command line” from the dialog box to open up the command line.
  3. In the command line, you should be in a directory on the CD. For example, I was in some directory like H:/sources/vista/x86 (or something along those lines). The important thing to note is that your drive letter may be completely different. (One way to make sure you are indeed in the Vista drive is to use the “dir” command. If you hear the CD drive spinning, then you are in the right drive. If not, you can change to it by typing “H:” or whatever your drive letter is and pressing enter.) To go up a directory from the command line, you must use the command “cd ..”. Type in that command and press enter. Continue to type the command until your current directory is only the drive letter. In my case, the prompt would look like “H:\>”, but again, your letter may vary. We now want to change to the “boot” directory, so type the command “cd boot”.
  4. Now we are in the boot directory of the Windows install DVD. This is where the fun begins. We first need to restore the MBR. This is the part of the hard drive that tells the computer what OS to boot. When you installed XP, XP overwrote the MBR and this caused the computer to ignore Vista completely. We can fix that with one simple command. Type in “bootrec /FixMbr” and press enter. It should tell you that the operating completed successfully. Also, issue the command “bootrec /FixBoot”. With those two commands, Vista should be ready to boot when you restart the computer.
  5. Before we restart, there are a few more things we can do to ensure the success of the next few steps. The reason we went into the “boot” directory of the CD is to access a utility called “bootsect”. This restores the boot code. I don’t think this is extremely necessary, but Microsoft includes it in the knowledge base article I linked to from above, so it must have some use. To use the tool, just type the command “bootsect /NT60 all”. It should say operating successfully completed for each of your partitions. I also like to use “bootsect /NT60 C: /force” just for good measure, so use that as well.
  6. Now we are ready to start the real magic. Type “exit” and press enter. In the dialog box that you are brought back to, press Restart. Either remove the DVD from the drive or just don’t press any key when prompted to on the restart. Let it boot from the hard drive. You should now be able to get into Vista.
  7. Here is where the fun begins. Instead of following Microsoft’s procedure of using bcdedit, we will use a program that makes everything easier. I initially used VistaBootPRO, but I recommend EasyBCD… it just seems more user-friendly. Download and install that.
  8. With EasyBCD started up (Windows UAP will require you to Allow it), select “Add/Remove Entries” on the side bar. This brings up a few options. The only one we need to concern ourselves with is the “Add an Entry” menu at the bottom of the screen. Windows is already selected, so that doesn’t need to be changed. Select “Windows NT/2k/Xp/2k3” as the version. For the drive letter, type the drive letter of your Windows XP install followed by a colon and a backslash. My XP install was D, so I typed in “D:\”. Name it whatever you want; I used “Windows XP Pro” as the name. Finally, press Add Entry.
  9. What we now have is a boot menu that let’s you choose either Vista or XP Pro. However, if you try to restart now and select XP, you will get an error. The same thing would happen if you followed Microsoft’s knowledge base article. The part that everyone seems to omit is that you must copy three files from your Windows Vista drive to your Windows XP drive. I give credit to “Computer Guru” (the creator of EasyBCD), because he directed someone to copy these files on the NeoSmart forums.
  10. Before the files can be copied, you must be able to see them. Unfortunately, they are hidden since they are important OS-related files. To view them, open up Control Panel within Vista and go to Folder Options. In the view tab, there is a list of options with checkbox. Uncheck the box next to “Hide protected operating system files”. A dialog box will confirm, so press Yes. Now you can press Apply and close the window.
  11. Now open up Computer from the start-menu. Double-click your Vista system drive. Now go back to the Computer window and double-click your XP system drive. With both open, you are ready to drag-and-drop the files. The three files we need are: “boot.ini”, “ntldr”, and “NTDETECT.COM”. Select the first one in the Vista drive window, hold down the control key, and then select the other two. When all three are selected, make sure you have both the Vista and XP drive windows visible so you can drag and drop the files from the Vista drive to the XP drive. Windows UAP will require you to confirm the operation, so do so. Vista will then copy those files to the XP drive.
  12. Now, after all that, you should have a working boot menu. Restart your computer and test booting into both XP and Vista. It should work like a charm!

Note: If you have the desire to keep some file synchronized between your XP and Vista installed (like, say, your iTunes folder), it seems that Microsoft has an incredible fast and powerful tool for just that called SyncToy. Give it a shot!

Posted in Howto's, Tech | 7 Comments »

7 Comments to “Howto: Dual-Boot Windows Vista and XP”

  1. abcd Says:

    EasyBCD is a much better piece of software, and the real deal.

    It does everything VistaBootPRO does and then some, including support for dual-booting OS X and Linux with just one click of the button. EasyBCD is made by the non-profit NeoSmart Technologies and doesn’t steal code and ideas like PROnetworks do.

    Try it, you’ll see what I mean.

  2. rob Says:

    EasyBCD is what I wound up using, and you are right in saying that it is overall better.

  3. down445 Says:

    I just did the same thing I partioned a second hd which gave me a g and h harddrive and put xp on the h part of it and left vista on the c drive and now have a dual boot without having to copy any of those 3 files over to the xp drive. both boot just fine with no problems. I needed to use some programs that would not run under vista and now they work just fine in the xp hd partition of the 2nd drive.

  4. zeerocks Says:

    Good article.

    This appears to need XP installed to a disk/partition within the machine after the drive is recognised and “identified” by BIOS (as D: E: etc).
    Do you know if this will work when a second disk (with XP already installed) is added to a Vista machine? Will the application on the XP disk get confused if the XP disk is not C: drive?

    Hope that makes sense.

  5. zeerocks Says:

    Good instructions. Looks straightforward.
    DOes this only work if you INSTALL XP onto the second disk.
    What happens if you add a second disk with XP installed (as well as applications)?
    Will the XP on the added disk still work? or will the applications be messed up if they are not on a C drive?

  6. jsarcher Says:

    Awesome guide my friend. Thanks so much. Fixed all of my trouble.

  7. rob Says:

    jsarcher, good to hear things worked out for you.

    zeerocks, I think the programs would indeed get messed up. However, I recommend that you keep XP on the C: drive and just install Vista on a secondary hard drive. There is no reason not to… Vista is a retail operating system now, with no risk of harming your system. I wrote this tutorial when I was experimenting with the RTM build that was given to my school, which I wasn’t sure was completely bug-free. Besides, when you install Vista afterwards then it takes care of making the boot menu up for you.

    From the sounds of it, though, you already installed Vista and hope to add your XP drive as a secondary. There is a way in some BIOSes to swap the C drive. IN other words, confuse XP into thinking it is the C: drive still. Unfortunately I don’t know specifics for your situation. Google should be able to help you.

    Also, sorry for not getting back so soon. I was on vacation.