How to dual boot Windows XP and Windows 7 (XP installed first)

We’re going to shrink the Windows XP partition on the hard disk and create enough space for an installation of Windows 7 Beta Home Premium. There are two easy methods of doing this – using the GPartEd Live CD and the DISKPART utility on the Windows 7 DVD. On some systems, depending on the primary storage controller, We’ll then install Windows 7 and use the EasyBCD utility to modify Windows 7’s bootloader to get XP loading properly.

Create Free Space in Windows XP

We assume that before you start this tutorial, you have backed up the drive (partitions and data) that will host the two operating systems.

Your first step will be to modify the Windows Vista system partition to make space for XP. There are three ways you can do this: GParted or DISKPART. We recommend using the GParted solution.

Option 1: Gparted

The GParted Live CD ISO is available here – burn it to CD and boot the system from the disc. The version we used was 0.3.7-7.

When you boot from the GParted LiveCD, depending on your system, you should just need to select the auto-configuration boot option.

During boot, press Enter twice when prompted to select the keymap and language settings.

When the main GUI loads, right-click on the main Windows XP NTFS partition (depending on your setup, probably /dev/hda1) and select Resize/Move.

Use the slider to reduce the partition size and free up enough room to install Windows 7 (at least 10GB) and click Resize/Move.

The changes haven’t actually been made, they’ve just been scheduled to run. To commit the changes and resize the partition, click Apply. GParted will ask to confirm the changes – hit OK and away you go.

Option 2: Using DISKPART

Boot the machine from the Windows 7 DVD. Select the appropriate language and then “Install Now”.

On the product key page, press SHIFT + F10 to launch a Windows PE 2.0 command window. Then type in DISKPART and press enter to get into the DISKPART utility.

Now type in LIST VOLUME – this gives you a readout of the volumes available on the system. Select the main Windows XP volume by typing in SELECT VOLUME 0 (in most cases it will be Volume 0 – in our lab in was Volume 1).

Now type in SHRINK. Windows 7 will reduce the size the selected Volume by around 50%.

Type “exit’ to get out of DISKPART and then “exit’ again to close the command window.

Install Windows 7

If you used the GParted LiveCD to shrink the XP partition, you’ll need to reboot the system from the Windows 7 install DVD. If you’ve used DISKPART then you just need to click “Install now” and continue the installation. There will be two install options – Upgrade and Custom – select Custom.

Once the install gets to the install location, there should be at least two options: a partition marked as Primary and Unallocated space. Select the unallocated space and click Next. The install will then commence.

The Windows 7 boot manager will take over the system completely.

  1. nashrul said,

    i will try it….

  2. i-so-rok said,

    tooooooo awesome thanks!!!

  3. helti said,

    it wont let me move or resize the partition… it gives me errors…

  4. ritwick said,

    Why are you showing this much complex method for this…..simple one is there

  5. Jason said,

    Wow – you wouldn’t believe how difficult it is to find this info as the net is littered with using ’shrink’ through the disk management tool within Windows 7 or using 3rd party software. To those above who don’t really see the point to this it’s nice to have a built in shrink tool to resize the partition while installing (less restarting etc) as it makes it a cleaner install in my opinion.

    Thank you for posting this information

Leave a Comment