Posted on

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

A step-by-step guide with screenshots

(Now updated for XP SP 3 and Ubuntu 8.04.)

Step 1 Intro

Step 2 Back up the GRUB boot menu
Step 3 Make space for XP
Step 4 Install Windows XP
Step 5 Restore the GRUB boot loader

Step 1 – Intro

Scenario: You want to install XP on your machine alongside your existing Linux installation on the same physical drive which already has Ubuntu 8.04 installed.

Tutorial Summary: We’ll create space on the Linux partition to install Windows XP. XP bootloader is fairly clumsy when it comes to dualbooting and will overwrite GRUB completely. We’ll reinstall GRUB to the MBR and configure it to dualboot both Ubuntu and XP.

This tutorial has been tested on a VMWare Workstation 6.0.3 virtual machine.

Step 2 – Back up the GRUB boot menu

Regardless of which bootloader you end up using, it’s a very good move to first back up the GRUB bootloader. It’s easy to lose it and unless you know how to re-write it from scratch then you’re generally facing a full reinstallation of Ubuntu.

Firstly, boot into Ubuntu and go to Applications –> Accessories –> Terminal. Then, type in sudo gedit /boot/grub/menu.lst.

This text file contains all the information GRUB uses to configure various boot options. Scroll down and the entries between “## ## End Default Options ##” and “### END DEBIAN AUTOMATIC KERNELS LIST” are the Linux boot options.

Make a backup of the file by going to File, Save As and selecting a different location. Or take a full copy of the contents and place it into a new text file. If you can, create the backup on a removable disk or networked location.