Vista XP Dual Boot - Understand the basics

raul

New Member
#1
Hi All,

Now EasyBCD is a fantastic program. I have raved about it before and I will do it again. Vista has a powerful bootloader but trust MS to ruin its usability. EasyBCD actually unlocks the full power of the Vista bootloader. It also makes grub on the MBR redundant - a god send for newbies - with neogrub as a file on your Windows. And you can boot OSX and PE too! Now thats super flexible for people like me who use it to boot Vista, XP, Ubuntu and OSX on the same hard drive.

I just bought a Sony SZ and it comes preinstalled with Vista Business and all the junk of the universe reducing this powerful computer to a pre 200mhz P2 with 128mb ram days. Since Vista is a confirmed dog the best thing you can do is put yourself out of the misery is to kill it and revert to XP.

Alas not an option till sometime ago however luckily Sony succumbed to consumer demand and posted all XP drivers and utilities for SZ. I thought it will be safer to dual boot untill I can confirm all the stuff is working well on the notebook. This is not a dual boot guide, there are many of those around, just a little background information that will hopefully give you a little more information about Vista/XP bootloaders, how they work and dual boot systems.

Dual Booting Primer
There are 2 parts to the boot process, the bootloader and the files on the 'active' partition it looks for to boot the OS.

1. For XP this is the XP bootloader (which gets copied to the MBR of your hardisk) and these 3 files; boot.ini, NTDETECT.COM and ntldr.

2. For Vista its the Vista bootloader and the folder /boot on the root of the Vista partition and the file bootmgr also in the root which is the Vista boot manager.

3. The PC bios loads the bootloader from the MBR. The bootloader then loads the files it is associated with, IMPORTANT: The bootloader looks for these files on the 'active' partition.

(So if you have XP MBR and it doesn't find boot.ini, ntdetect.com and ntldr on the active partition it won't boot. Similarly if you have Vista MBR and it doesn't find /boot folder and bootmgr on the active partition it won't boot. This is usually the problem in some sticky dual boot scenarios, the files will be there but not in the active partition)

4. Vista's Bootsect.exe can write both XP and Vista bootloader to selected disk bootsector (*not* MBR).
for instance:

bootsect.exe -NT60 C: will write Vista bootloader to C drive.(you can write to any drive letter, you usually want to write to the active partition)

bootsect.exe -NT52 C: will write XP bootloader to C drive (you can write to any drive letter, you usually want to write to the active partition)

Now if you have these files with you preferably on a rescue disk like VistaPE/BartPE, and the knowledge of how they work you will never be stranded.

EasyBCD can also write the Vista bootloader but sometimes things are so messed you can't run it untill you use these tools first.
See http://neosmart.net/wiki/display/EBCD/Repairing+the+Windows+Vista+Bootloader for more instructions on reinstalling the bootloader either by hand or with EasyBCD.

Dual-boot setup
Now installing XP after Vista has a few issues as opposed to installing Vista after XP.

If you install Vista after XP, Vista automates the dual boot and presents you with a menu to choose Vista or XP in the boot menu. You don't have much to do. Here XP is C drive(active partition). Vista would be any drive you installed it to, D,V whatever but not the active partition. Vista will install its bootloader to MBR and place its boot files in the active a partition, in this case C: where XP is installed. So when you reboot into XP you will see this new folder called /boot in your root and a file called bootmgr also in your root. The /boot folder contains a file called BCD which is what EasyBCD manipulates to set up boot options.

Now if you install XP after Vista, it will merrily overwrite your MBR with its own bootloader and the next time you reboot you will boot straight into XP. No Vista option. Installing XP after Vista also means Vista is the active partition and XP is installing on another partition/Disk, could be drive D/whatever. In this case XP will install to the particular partition you want it to but put its boot files in the active partition, in this case Vista's partition which is C. This is also why when you install XP after Vista in a dual boot system, XP drive will be D/or whichever drive you installed it to but not C. This is not really a problem, since XP is smart enough to set itself up properly but some installers can get confused and install on Drive C which is Vista.

Now a couple of things have happened in the background
1. Vista bootloader was installed on your MBR, it was referencing the boot folder on Vista drive C and bootmgr file on Vista drive C to boot Vista. XP just deleted Vista bootloader and placed its own bootloader which is now looking for these 3 files boot.ini, NTDETECT.COM and ntldr on the active partition to boot XP. XP install process places these files in the active partition, in this case C where Vista is installed not where XP is installing. So when you reboot XP bootloader reads these files from the active partition(Vista C) and boots in to XP.

To dual boot you have to:
1. Restore Vista bootloader.
2. Set up Vista bootloader to give you an option to boot XP.

Restoring Vista bootloader will boot into Vista, you won't have an option to boot into XP untill you set it up which is where EasyBCD comes in. Once you restore Vista bootloader with EasyBCD or bootsect.exe -NT60 C: you will be able to reboot into Vista. Here you can run EasyBCD to set up an entry for XP. EasyBCD will edit the BCD file and add an entry or XP. The next time you reboot you will have an option to boot Vista or XP and you are set.

But the whole problem for me was purely superficial. I didn't want XP as drive D, I had no intention of using Vista (just wanted to leave it there) and wanted XP as drive C. In my SZ following the normal dual boot guides XP was showing up as drive D. Apparently with some registry editing you can change that but it didn't work for me. XP doesn't like its drive letter changing after install and it won't boot.

So I reinstalled XP but this time after creating the XP partition in Vista I made it active. So when XP installed it installed on the active partition which is Drive C and after installation on reboot it showed up as Drive C which is what I wanted. But now restoring the Vista bootloader and setting up a dual boot would be slightly more tricky. Why?

if I restore the Vista bootloader when I reboot, the Vista bootloader will look for its files on the active partition, in this case it is drive C where XP in now installed (this is where Vista would be normally but remember I had made the XP partition active before rebooting to install XP) and will find no /boot folder or bootmgr file and no boot for me.

The trick for me now is to copy over /boot folder and bootmgr file from Vista's partition to XP and making an entry for XP via EasyBCD before restoring the bootloader. Once that is done Vista bootloader will find its files on my XP partition and offer me a nice dual boot menu. Of course the Vista bootloader files are also on the Vista partition but the vista partition is not active hence the vista bootloader doesn't reference them at all. Should I remove XP, I will have to make the Vista partition active and then reboot or else I will have a no boot show again. Hope this writeup will be helpful for those dual booting to understand how it works so you don't get into a sticky situation.

Additional Links
* Possible change of active partition & solution
 
Last edited by a moderator:

mqudsi

Mostly Harmless
Staff member
#2
Nice post, thanks.

I'll probably link this from the Windows XP documentation in the Wiki - feel free to edit and update it as needed.
 

raul

New Member
#3
Hey Please do, I was in a bit of a pickle recently and had to mess around a bit. Hope this info can be useful to others.

Cheers
 
N

nmnetworkservices

Guest
#5
Thank you for the awesome write-up on this topic, it helped me fix my dual boot system Vista/XP.
 

Terry60

Knows where his towel is.
Staff member
#7
Hi Raul,
Hope you don't mind me adding an addendum to your nice little guide.
It concerns the active partition

On a brand new-build PC I pre-formatted the HDD with a bootable floppy containing Paragon Partition Manager to have, in this order C 25 Gb - D 10 Gb - L 10 Gb - E 30Gb - F 390Gb

I installed Vista 64 in partition C then XP in D (L was reserved for future Linux, E for 3rd party software and F for Data)

As expected XP overwrote Vista's MBR, so I ran Vista recovery disk to repair the boot sector.
At this stage Vista bootloader recognised the existence of XP and gave me the "Boot Legacy WIndows" option at which point I used the wonderful EasyBCD to tidy up my boot process and rename everything with recognisable labels. Everything working and hunky-dory.

Almost exactly as you described, except for a slight under the skin, invisible unless you look for it, difference.

For some reason during the XP install / Vista repair process. Partition D became the active partition, and Vista installed all its boot files on D along with the XP boot files.

I assume this is because I installed both systems by booting their CDs, and did not install XP from the Vista partition, thus allowing XP to set the second partition active as it installed, forcing Vista into subservience despite its position at the front of the disc. Maybe this explains too why you didn't get a boot option for XP until you set it up with EasyBCD, whereas I got one which merely needed to be tidied up.

Now on a perfectly working system no matter which OS is booted
C is Vista , D is XP (active)

This causes no problems but I thought I'd mention it here in case someone reading this, is searching their C disc in vain for all the relevant files and wondering where they've gone.
 
Last edited:

mqudsi

Mostly Harmless
Staff member
#8
Adding a link to your comments in the original post, Terry. Thanks for sharing your solution.
 
#9
Had a strange issue last night along these lines. I have XP Pro x64 on C, XP Pro x32 (for games <g>) on D, downloads and such on E, all FAT32. Set aside a new NTFS partition for Vista Ultimate. Its install saw everything else, I selected the new partition, install went flawlessly - I thought. When I eventually rebooted and later tried to go select Older Versions of Windows, the Vista bootloader gave an "/ntltr is corrupt or missing" error message. Booted into Vista, found it had called its partition C, XP x64 (formerly C) was now D, and so forth for the relettering of drives. Used VistaBootPro to uninstall the Vista bootloader & reinstall the XP bootloader, got into XP (both of them) fine, but of course Vista is now inaccessible. Am truly puzzled -- are there any decent fixes to this problem, or will I simply have to use VistaBootPro (have it in both the XP x64 & Vista installations) to keep swapping out bootloaders?
 

Terry60

Knows where his towel is.
Staff member
#10
Hi Doc, welcome to the forum.
The letters given to the disk drives are an internal construct of the OS that's booted. (just what it calls them)
When you get back into XP, It should still call the disks what you were used to, with Vista probably called F:\
The problem you are having with the XP boot file, is that Vista is now the primary bootloader and it has all the boot files on the system active disk.
I think, because you have 2 XPs, there will be a second level boot, which is probably where the problem lies if Vista has moved ntldr. ( I only have one XP so the process went without problems)
Check the wiki
http://neosmart.net/wiki/display/EBCD/Troubleshooting+Windows+XP
which describes the problem.
It's probably just a case of copying ntldr back so that both boot levels know where to find a copy.
 
#11
Terry -- Many thanks for the quick response, you should run Microsoft tech support!:smile: Checked drives, and the Wiki you pointed me to; My XPx64 C partition has both ntldr and ntdetect.com on it (at least after I re-installed the XP bootloader), as well as the boot.ini file. Don't see the first two (and wouldn't boot.ini, of course) on the Vista partition (yes, I can see hidden operating system files). Should I simply copy both to the Vista partition (thus having them on both XPx64 & Vista partitions), reinstall the Vista bootloader through VistaBootPro, and pray "something" boots?:booyah: - Alan
 

mqudsi

Mostly Harmless
Staff member
#12
Kind of.

Assuming the Vista drive is the boot drive, then copy them to there and use EasyBCD to reinstall the Vista bootloader. VistaBootPRO is built on stolen code (our code) and isn't as reliable nor as capable EasyBCD is.
 
#13
Thank you. I just downloaded EasyBCD, will copy those two files from C to the Vista partition (F), then use Easy BCD to do what you recommend.

And I am uninstalling VistaBootPro, did NOT know it was based on stolen code, truly despise people who do that -- but then, being honest was always a liability for me, especially when I was in Washington....:scared:

Alan
 

Terry60

Knows where his towel is.
Staff member
#14
Alan, when you've used Guru's lovely EasyBCD to get your dual-boot working, beware!
If you're a user of system restore, you'll need to know that XP destroys all of Vista's restore points, so before you become dependant on them you'll need to take steps to protect them.
You'll need to hide any partition with a Vista system restore folder when XP's booted.
Luckily for you, Guru has also written "Vista Hide 'n Seek" (HnS) whose function I'll leave you to guess.
Take a look at the appropriate thread in "Ideas and Wishlists"
 

mqudsi

Mostly Harmless
Staff member
#15
To clarify:

It's not a problem with EasyBCD or any other program you use to dual-boot, it's a bug in Windows (XP and Vista, either or, take your pick) that wipes out Vista restore points when you boot into XP. :smile:
 

Terry60

Knows where his towel is.
Staff member
#16
Sorry CG - badly expressed
Didn't intend to imply a problem with EasyBCD, just with dual -boot.
 

mqudsi

Mostly Harmless
Staff member
#17
Naw, that's OK... I'm admittedly overly-touchy about EasyBCD :tongueout:
 

Terry60

Knows where his towel is.
Staff member
#18
#19
Terry, Guru, I used EasyBCD and got everything up and running perfectly. THANK YOU! I'll check out the HnS program, and having a rare day more or less off, I am going to browse the rest of the Neosmart forums, wish I had found this website earlier. Appreciate you!
 

mqudsi

Mostly Harmless
Staff member
#20
You're most welcome, Alan!

If there's anything else we can help you with, just say the word :smile: