How to dual boot Linux and Windows XP (Linux installed first) -- the step-by-step guide with screenshots

James Bannan05 June 2008, 1:59 PM

How to dual-boot Windows XP and Linux. (Now updated for XP SP 3 and Ubuntu 8.04.)

Page 1 - Intro


Updated 5 June 2008 - now uses Ubuntu 8.04 as the Linux distribution.

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.

Continue to page 2: Back up the GRUB boot menu
Page 1 Intro
Page 2 Back up the GRUB boot menu
Page 3 Make space for XP
Page 4 Install Windows XP
Page 5 Restore the GRUB boot loader

Post your comment



First 50 Comments

View All Comments (138) RSS feed Email alert

Ubuntu Tutorials:

It has been so long since I've dared install XP. I didn't realize how outdated it looks compared to the Ubuntu installer!

...just an observation.

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

ks (New user):

How about a competition where the one who can bag windows the most wins? This really craps me. Just use Linux and be happy - that's enough. Or even better, use them both and use them both well. That's what I try to do, and thanks to this howto now I can do both on my new computer. I'm no expert and I was very grateful for this howto to get XP running. It's a good OS. I would even say there are things I like about it (gasp!).

If you think you can do better, do better. We'll check it out.


16 April 2008, 12:42 AM (1 year ago)report abuse Send to a friend reply

ks (New user):

...just an observation

16 April 2008, 12:55 AM (1 year ago)report abuse Send to a friend reply

ks (New user):

How about a competition where the one who can bag windows the most wins? This really craps me. Just use Linux and be happy - that's enough. Or even better, use them both and use them both well. That's what I try to do, and thanks to this howto now I can do both on my new computer. I'm no expert and I was very grateful for this howto to get XP running. It's a good OS. I would even say there are things I like about it (gasp!).

If you think you can do better, do better. We'll check it out.


16 April 2008, 12:54 AM (1 year ago)report abuse Send to a friend reply

What? (New user):

problem...
when i get to the "install xp" step i get a message something like - "windows cannot find any installed hdds"...

any ideas?
thanks!

02 June 2008, 12:15 AM (1 year ago)report abuse Send to a friend reply

marinegundoctor (New user):

Quoting What?:
"windows cannot find any installed hdds"...any ideas?thanks!


SAY, if you (or anyone else) is having this error with XP, then you will need to find and download the SATA drivers for your disk. I had this prob and got them from gateway.com. press F6 during the initial setup of XP, when prompted to do so, to intstall 3rd party drivers.

07 February 2009, 8:28 PM (1 year ago)report abuse Send to a friend reply

to ubuntu? (New user):

I burnt a windows xp cd as a .gbi file using gburner but the computer wont recognize it as a boot disc and loads grub normally, the boot priority is set to the cd drive first, can anyone help?

14 April 2009, 10:23 AM (11 months ago)report abuse Send to a friend reply

Tom:

Never ever use sudo to open a graphical application, use gksudo or, in KDE, kdesu. Using sudo could mess up your ~/.ICEauthority

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

Dave:

You guys are cool as for creating these guides. Looking forward to the XP to XP+Linux guide.

Thanks

Dave

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

cthisbear:

Come on. How about getting on board to Puppy
Linux Live CDs.
Australian
Worlds fastest...runs in memory
7 official releases in 2006
All different Puppy derivatives from 12 megs
to 500 megs
Different language versions
Latest official Puppy 2.14 is 87megs
Recycles the oldest computers..runs the newest

Instead of Me Too lazy journalism..give your readers the worlds best Live boot CD.

Made in outback Western Australia by
Barry Kauler....homepage

http://www.puppyos.com/
http://www.puppylinux.org/wikka/LatestNews

Versions of Puppy

http://puppylinux.org/wikka/VersionsPuppy

Regards Chris.



29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

R Gersbach:

The litter is too big. 6 versions? Why not one version that is supported for a number of years and works out of the box, like Windows. Hopefully Dell AU will sell Linux on machines in Australia at the right price. And my broadband supplier will support it.

29 February 2008, 8:38 PM (2 years ago)report abuse Send to a friend reply

Brett:

Why don't I have the ability to right click and manage flags in GNOME Partition editor?


29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

Freddy:

how come I don't have the option to right click and manage flags in Gnome Partition editor?

29 February 2008, 8:39 PM (2 years ago)report abuse Send to a friend reply

Dalobo:

When I right click on any partition, I do not have the manage flags option...

How do I get this? I downloaded the latest version of the OS 6.10

I see I am not the only person asking this question. Us Windows users who are slowing making the jump to Linux need some help here...

My windows install is on the C drive as well.

So how about a response? Live CD and no manage flags there...!

HELP!

29 February 2008, 8:39 PM (2 years ago)report abuse Send to a friend reply

new ubuntu:

ok so i did the partition then when I get to XP everything is working fine then after it is done installing its stuff it says starting up XP the screen goes black for like a second and then comes back with screen where you chooseto install and my keyboard has bombed out and it doesn't work. Any suggestions please post.

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

nes:

me too, any suggestions ?

29 February 2008, 8:39 PM (2 years ago)report abuse Send to a friend reply

Anonymous69:

thats cos you copied and pasted the active chainloader together. check the pic underneath. thats how it should be. check it

29 February 2008, 8:39 PM (2 years ago)report abuse Send to a friend reply

leode1 (New user):

Hey, I have windows XP Home installed on C drive. I have 5gb D drive and ubuntu-7.10-desktop-i386.iso. Can I just go ahead and install it on drive D? Can help with any instruction set for it? Please mail me on see_1ani@rediffmail.com

06 April 2008, 2:15 AM (1 year ago)report abuse Send to a friend reply

jud:

You saved me!! I had gone thru this dual boot installation all on my own.... until I realized that I was stuck booting into Windows and couldn't boot into Ubuntu! Your GRUB bootloader workaround is fantastic! THANKYOU

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

Sidewinder:

Thanks a lot for your guide, it all worked like a charm. Even I, an absolute noob, could do this.

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

jamie:

i have not yet installed windows, but in the instructions above, in the section 'GRUB timeout'.

it talks about being able have xp as the default, and it say, 'replace the value' what value do i replace it with.

currently i have ubuntu 6.10 installed on my laptop, and i want to dual boot windows xp for the first time.

assuming i follow the instructions, and i am up to that bit, HOW WHAT VALUE DO I REPLACE 0 WITH?

if anyone can help me out i would greatly appreciate it.

thanks jamie....

29 February 2008, 8:39 PM (2 years ago)report abuse Send to a friend reply

Koji:

My steps were a little different, when I first installed Edgy I created a partition for Windows to reside in at a later date, so windows is hd(0,0)

After installing Windows XP MCE, the first time, the system drive was F:\. I then re-installed XP MCE from scratch to the same partition (deleting the original installation), and the system drive for windows is now C:.

Dual boot works great, hd(0,0) = Windows, hd(0,1) = edgy.

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

Vimal George:

What can I say?

You guys just wrote the Superlative article on the topic thats been bugging me.

I'm a stickler for performance. I don't care much for windows except for the occassionaly must-have win32 app without *nix equiavalents(the list approaches NiL as i speak!)

The thought of Win XP being at the high-performance end of my 100GB hard disk irks me no end. I'd rather my Ubuntu workstation install reside there.
Win XP is about to be banished to the last 6GB of my Disk(muhahaha take that! B1LL)

This approach also allows for more flexible partitioning strategies such as a Linux Swap partition mounted at /dev/hda2 right after the "/" partition for performance reasons(i.e READ Disk access times and seek latency Numbers)

Also keeping a common "/home" mounted partition is a good idea for organizing your personal data with redundancy.

Plus all I have to do to get access to my
"/home" partition under XP is to use the Fs-driver Ext2 Kernel Filesystem extensions in XP)
www.fs-driver.org
anyway
All in all.. a very whole-some article. Keep it coming. I'm now a fan :-)

Suggestions:
An edit could be added to include the taxonomy for x,y in the grub(x,y)commands mentioned in your tutorial. The numbering scheme there starts from hd0 ; unlike
/dev/hdaX, where hda1 is always first.

29 February 2008, 8:39 PM (2 years ago)report abuse Send to a friend reply

Another user:

This how to guide is very flawed. Like several other people, I don't seem to have the manae flags in my menu. Now my Ubuntu install is dead.

Note to the author: Put in some updates, or at the very least some alternate options to fix the boot record. I am not sure if your live CD is older, and still has the option, or if you are using a different version of GPARTED. Get your stuff updated please!

pbplayer

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

Jonathan:

Thanks man! I followed your instructions to the letter, and they worked without a single flaw. I'm on XP and Feisty.

Thanks again!

29 February 2008, 8:30 PM (2 years ago)report abuse Send to a friend reply

Daniel Tolbert:

I didn't have the 'Flags' option on my boot CD either, but i just went to gparted's website and they have a LIVE CD that works just as well. So if you get to that point and don't know what to do just goto http://gparted.sourceforge.net/ and you should be able to get everything sorted out from there.


29 February 2008, 8:42 PM (2 years ago)report abuse Send to a friend reply

Martin:

I want to dual-boot from an existing XP setup, but your link at the top of the article "how to dual-boot Linux with XP, with XP installed first" appears to be dead ... it loops back to this page in Groundhog-Day fashion.

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Dan Warne:

Hi Martin, apologies for that. It's fixed now. Here's the link .



29 February 2008, 8:43 PM (2 years ago)report abuse Send to a friend reply

Augusto:

I bought the latest issue of "apc" mainly because I am interested in installing
Linux in my PC. I followed your instructions, extracted Ubuntu 7.04
into my harddrive and then I burn a CD with the ISO image (about 700 MB).

Unfortunatelly my PC didn't boot from the CD (I did change the ''Bios" to make it
boot from the CD) and nothing happens! my PC is a Dell Dimension 5150 running XP.

Can anyone sugest a solution to this problem?

Thanks,

Augusto

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Bazza:

The checksum probably failed. Before burning the next CD use checksum to verify that the contents are correct.

29 February 2008, 8:43 PM (2 years ago)report abuse Send to a friend reply

Toosmoky:

"There are ways to make the Ubuntu partition bootable while still using XP’s bootloader in the MBR. However this is fiddly and involves using FAT32 partitions"

Bzzzzt! A FAT32 partition is not necessary. I've set up many XP/Linux dual boot systems using the NT bootloader off an NTFS partition. I currently run a XP/Ubuntu Feisty system with no FAT partitions within cooee.

Although one can set it up manually, the easiest way is to use bootpart. Either LILO or GRUB can be used and both work without any drama at all.

One advantage is that if you select the linux partition at bootup then decide you want Windows instead, you just choose windows when you get to the linux bootloader, thus reloading the NT bootloader again.

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Hugh Pearse:

I followed these steps exactly and got XP working but I have a large problem.

When i try to install my drivers they all try to install to C:\\ and windows detected my other partitions so they were named C:\\ etc and my windows installed as G:\\.

When i tried to install my Modem Driver it just site there looking for C:\\.

Is there a way of installing windows so it doesnt detect the other Ubuntu partitions????

that way i can have my C:\\

From,
Hugh Pearse

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

DG:

i've downloaded and burned the GParted Live CD but when i try booting the system with it, i only get a Grub prompt, what to do?

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Keari:

Hi,

When I went to modify the Boot Menu, the menu.lst was blank... I did everything you said before that that pertained to reinstalling GRUB to MBR.

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Flyingbear:

I got the same initial result of a blank MENU.1st page. That's because there was no existing file called menu.1st.

I had a flash of inspiration and went back to gedit /boot/grub/menu.LST and VOILA! everything was where it should be.

Do note the post as to the correct format for the MAKEACTIVE command... Use the example in the LOWER WINDOW as you cannot string it together as the upper window suggests.

Good luck.

29 February 2008, 8:44 PM (2 years ago)report abuse Send to a friend reply

keith:

When installing windows make sure you have a cd with service pack 2. If you don't, windows will not recognize there is any free space on the drive and will say it's 1 large unknown partition.

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

joey:

I thought that I had followed these instructions exactly, and everything seemed to be working, until the very end. When I chose 'Windows XP' from the menu to run it an error came up that read

"Error 13: Invalid or unsupported executable format"

I am not sure what I should do here! If anyone knows what I have done wrong, or how to fix this problem it would be greatly appreciated!!

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Dan:

I have this same problem. Has anyone answered this?
Thanks!

29 February 2008, 8:47 PM (2 years ago)report abuse Send to a friend reply

Bionicbone:

Someone please answer. I have a Vista (installed 1st) - Ubuntu (installed 2nd) - XP config now. Vista and Ubunto are fine but I really can't get XP to boot. Strangly if a set XP as (hd0,0) in Grub my Acer XP recovery boots just fine so I reckon I am almost there.
P.S. My first XP boot error was no NLTDR. I found the XP installation had placed these in C:\ (Vista Installation). Moving these from C: to E: (XP instalation) soved that prob.

29 February 2008, 8:49 PM (2 years ago)report abuse Send to a friend reply

CalvinK (New user):

I had Error 13 as well then i figured out the problem: you have to name the right partition the XP is on. My problem was I forgot about the "swap" partition which was recommended when I installed Ubuntu... therefore it makes XP on the 3rd partition, or hd(0,2) instead of hd(0,1)
hd(0,1) = 1st hard drive, 2nd partition
hd(0,2) = 1st hard drive, 3rd partition ("1st" starts at 0)
hopes this helps

05 June 2008, 3:50 PM (1 year ago)report abuse Send to a friend reply

Ron Lankshear:

Thank You - your steps are very good and I was able to get exactly what you said above.

XP now is default boot.

The other way round XP adding Linux failed. All was well but Ubuntu boot failed

run_progess `/sbin/modprobe` abnormal exit

https://launchpad.net/bugs/84964
does not seem to be a fix.

Left me with an unbootable machine - so I reformatted drive and installed Ubuntu 704.
and followed your steps above to have Dual boot working great.
I'd suggest a warning on your XP to Linux.

I got to do this as my OLD HD failed and after I put a new one - neither XP or my Macbook could read the bad drive.

Ubuntu 704 LiveCD could and was able to recover 99% without resort to backups which were not that current.

So I am a happy with Ubuntu and some things it can do BUT there is a lot I still need XP for - Scanners printers etc

Ron



29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

The Penguin (Advanced member):

Which printer are you using?

16 April 2009, 12:11 AM (11 months ago)report abuse Send to a friend reply

noone:

Very good guide, saved me from trouble - I installed XP after Ubuntu without checking first how to make both work - Good Job!

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Anonymous101:

everything was going great untill i typed in

"sudo gedit /boot/grub/menu.LST"

there is no text


29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

Spooter:

Brillent guide, printed it out followed each step then finished with a nice dual boot system of Xbuntu and Windows.

Anyone know what happens if I assign the Windows XP drive a new drive letter such as c: rather than f:?

29 February 2008, 8:31 PM (2 years ago)report abuse Send to a friend reply

comintno2:

I have just started, and I am faced with 3 partitions - Which one do I choose?
/dev/sda1 Fat16 54mib
/dev/sda2 Fat32 2.0gib
/dev/sda3 ext3 196.mib

Please tell me which is the one to resize?

29 February 2008, 8:32 PM (2 years ago)report abuse Send to a friend reply

The Penguin (Advanced member):

What size is the disk?

16 April 2009, 12:19 AM (11 months ago)report abuse Send to a friend reply

1420:

using a 1420N dell laptop with ubuntu 7.04 pre-installed. Partition 1 (primary) Utility Partition (UP) n/a 32 MB
Partition 2 (primary) Reinstall Partition (CP) n/a 2 GB
Partition 3 (primary) Linux /boot 200 MB
Partition4 (extended) Extended n/a Swap + rest of disk
Partition 5 (logical) Swap n/a (1.3 x RAM) + 10 MB
Partition 6 (logical) Linux / Rest of disk

particularly I need to know where make the partition (tried to make a another partition 7 that was unallocated 20GB made with gpart live cd that was under the extended and made from the partition 6 "Rest of disk" but when i tried to load windows xp sp 2 cd it could not read the hd. I took the flag off the boot drive as well.

29 February 2008, 8:32 PM (2 years ago)report abuse Send to a friend reply

Mat:

I did everything following this tutorial and now if I try and select Windows Xp from the boot menu, I get

"Starting up

Error 8: Kernel must be loaded before booting

Press any key to continue"

And it wont load. How do I fix this?

29 February 2008, 8:32 PM (2 years ago)report abuse Send to a friend reply

Brian Huang:

It is not a good idea to install Windows onto a drive not labeled as C. Use spfdisk to hide Linux partitions before installing Windows.

29 February 2008, 8:32 PM (2 years ago)report abuse Send to a friend reply

View all comments (138)  

anonymous user Anonymous user

April APC on sale now!

Tags