How to dual boot Windows Vista or Windows 7 from XP NTLDR

EDIT March 1st, 2010: This only works if the XP and 7 partitions are on the same drive.  If you’re doing XP on one, to a Windows 7 on another, skip to the bottom of this page!!!!!

This is another one of those things where I’ve seen too many “Oh you can’t do that, you have to use Vista Bootloader”.  That is crap and utter lies.  YOU CAN BOOT VISTA OR 7 FROM XP’s NTLDR.  Its a tad tricky, but it works.

ONTO THE GUIDE! USE AT YOUR OWN RISK I AM NOT RESPONSIBLE FOR “OMG I SCREWED UP AND LOST MY DATA.”

Toys Needed:
I assume you have XP already installed
Windows 7 Beta 1, RC, or any whatever build.  This guide is probably future proof.
Gparted
A USB flashdrive, formatted in FAT with at least 2MB free.

For all intents and purposes, I’ve setup a virtual machine with XP ahead of time.  Like most PCs its using the whole hard drive as below.  If you have multiple harddrives, to make things easier, unplug all unneeded drives.  For RAID users….sorry, I’m not covering that here.

This is where GParted comes in, to save us from the new bootloader and reclaim some HDD space.  BE WARNED that resizing partitions without knowing what you’re doing is VERY DANGEROUS.  Before we use GParted, plase make sure you have used defrag and checkdisk on your drive.  For my testing, I will be putting 15GB aside for Windows 7 RC1.

Burn your GParted iso to a Cd and boot up.  Most default options work for everyone.  It will eventually boot up into a graphical environment.  You want to right click on the giant partition (usually hda1 or sda1) and click on Resize, and shrink it down.  (The 8MB stuff at the end is from XP, don’t worry about it)


You should now see a new blank spot.  This is where our Vista/7 is going to go to.  Right now, right click on the blank space, and select New.  Make sure you set it to be formated to NTFS (this is to stop Vista and 7 from making 100-200MB partitions in front of it during install.)  Call it whatever, I’m naming it Win 7 for now.

Hit apply and pray to whoever things work.  When it is done, boot back into XP, and LET IT SCAN THE DISK.  Verify your XP is still working before continuing.  It should find a new Generic Volume.  Boot back into GParted.  Once inside, right click on the XP partition and select Manage Flags.  Make it Hidden.  This will keep Vista / 7 from messing with that partition during installation, especially its NTLDR.  On the partition we plan to put Vista / 7 on, we need to make change its flags to Boot.  It should look like the following:

Okay, time to boot and install Windows Vista or Windows 7.  Pop the DVD and start installing.  It’ll ask you UPGRADE or CUSTOM, select CUSTOM.  Select the 2nd partition, the one we labeled  Win 7.  By the way, it won’t let you install to the first partition due to the hidden flag we put on it earlier.

Sit back, relax, watch TV, surf the web, its gonna be a while.  Once it is finished, it should boot to Vista or 7 no questions asked and disk management should look like

So our OS install is finished, XP was left alone.  Now to the last part.  Shutdown the machine, plug in your USB flash drive, and boot back into GParted.  Click on the device tab and make a note of what your USB device is, in my case it is SDA1.  Select the XP partition and remove the HIDDEN flag.  On the GParted Desktop, open up Terminal, and run the following commands in this picture.  Again, this assumes your USB drive is SDA1 (the 1 is for the partition number).


What we’ve done is check we are in the /home/user directory, made a USB directory, and mounted our USB drive there.  Now for the moment of truth, type dd if=/dev/hda2 of=/home/user/usb/Win7.rc1 where hda2 is the partition of Windows 7, and Win7.rc1 is the file we are saving some data as.  IF YOU DO THIS WRONG YOU MIGHT TOAST A PARTITION TABLE AND BASICALLY SCREW UP YOUR DATA SO BE WARNED.  What we’re doing is saving the bootsector of that partition to a file on that USB drive.  You should see the following:

Okay, close out the Terminal.  Back at GParted, set the Windows XP partition to boot. so you should see BOOT on the first partition and no flags on the Windows 7.  Reboot, it should go into XP.  Once its on, place the file we made Win7.rc1 from our flash drive into C:\     (so you get C:\Win7.rc1).

Right-click My Computer -> Properties -> Advanced Tab -> Startup & Recovey Settings.  Update “Time to display list of operating systems” to your choosing, and hit EDIT.  Notepad will open up, turn off Word Wrap if it is on.  Add our little bootfile to the list like this:

Save & Reboot & Enjoy :-)

Edit March 1 2010: Download grldr.  What it is, its “Grub4Dos”.  What does it do?  Well its a secondary bootloader, that I’ve preconfigured to boot into Windows Vista/7’s BOOTMGR.  If it fails to do that, it goes back to XP’s bootloader :)   Save it to the root of your XP drive.
Right-click My Computer -> Properties -> Advanced Tab -> Startup & Recovey Settings.  Update “Time to display list of operating systems” to your choosing, and hit EDIT.  Notepad will open up, turn off Word Wrap if it is on.  Much like the last image above, add a line to boot.ini, except change “Win7.rc1″ to “grldr”.