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

James Bannan03 March 2009, 8:00 PM

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

Page 3 - Make space for XP

Now we need to create space on the hard drive for XP, so this will involve resizing the main Ubuntu partition. Restart the system using the Ubuntu Live CD as this gives you access to GNOME Partition Editor. When the CD loads, select "Try Ubuntu without any change to your computer".

Once the CD loads, go to System, Administration, Partition Editor.

Right-click on the main data partition which has been formatted with ext3 - it should be /dev/sda1 - and select "Resize/Move".

Move the slider from the right to shrink the ext3 partition and create free space on the hard drive, which will take the NTFS XP partition. Make sure that the free space is sufficient to hold XP (at least 2GB - preferably 5GB). Then click "Resize/Move" to confirm the selection, and "Apply" back in the main screen to carry out the pending change.

Continue to page 4: Install Windows XP
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 (153) RSS feed Email alert

ebarriosjr (New user):

Thanks a lot men!!! I have just finished installing Windows XP 64-bits after havimg Ubuntu 8.04 installed and your guide yorks like a charm.... Thanks a lot for the help! Keep posting!!!
XD

19 October 2008, 6:52 AM (4 years ago)report abuse Send to a friend reply

suresh vadivelu (New user):

i installed xp2 & suse linuxin my system but now i can't able 2 use, bcoz linux drive is not showing in my system tell me how 2 use both os in same system


08 November 2008, 11:17 AM (4 years ago)report abuse Send to a friend reply

Somebody (New user):

Anyone knows if this works on Linux MagicBox 12?
Please answer me!

01 December 2008, 12:06 AM (4 years ago)report abuse Send to a friend reply

Somebody (New user):

Does anyone knows if this also works on Linux MagicBox 12 ?

01 December 2008, 12:06 AM (4 years ago)report abuse Send to a friend reply

Somebody (New user):

Does anyone know if this also works on Linux MagicBox to instal Windows Xp Black edition?
Please answer

01 December 2008, 12:06 AM (4 years ago)report abuse Send to a friend reply

omnibus (New user):

When i start the xp cd it tells that it can't find any harddisks...

Can anyone help?

-Max

05 December 2008, 8:03 PM (4 years ago)report abuse Send to a friend reply

LesterAr (New user):

Hi Max! I´m having the same problem. Did you get to solve it? How di you do it? Thanks!

20 May 2009, 5:53 AM (4 years ago)report abuse Send to a friend reply

ramyapriya.m (New user):

please help me how to instal linux,as im already having windows xp

14 December 2008, 1:36 PM (4 years ago)report abuse Send to a friend reply

bedachtm (New user):

Not working for me. At XP CD Boot step I get message that windows is inspecting hardware, then nothing, just a black screen.

29 December 2008, 8:21 AM (4 years ago)report abuse Send to a friend reply

bedachtm (New user):

I tried to follow instructions, All went well up to the boot from the XP CD. I get a message "Win inspecting H/W cofig..." then black screen - nothing more.

Any idea what this could be?

29 December 2008, 8:51 AM (4 years ago)report abuse Send to a friend reply

bazzer (New user):

baz:
i am new to Linux .i have a vista on my dell and want to install kubuntu or any linux and have dual OS. i have done the partation using vista. i have around 5 partation now.they are as follows :os vista 250,recovery 10,f 100,g 100 and the last one is small dell related one. the four first one support NTFS system. Do i have to change that if i want to install linux ?
i tried installing it from a kubuntu cd but nothing work ?
What is my next step ? Can somebody advise me please ?
Cheers !!


10 January 2009, 3:56 AM (4 years ago)report abuse Send to a friend reply

bazzer (New user):

baz:
i am new to Linux .i have a vista on my dell and want to install kubuntu or any linux and have dual OS. i have done the partation using vista. i have around 5 partation now.they are as follows :os vista 250,recovery 10,f 100,g 100 and the last one is small dell related one. the four first one support NTFS system. Do i have to change that if i want to install linux ?
i tried installing it from a kubuntu cd but nothing work ?
What is my next step ? Can somebody advise me please ?
Cheers !!


10 January 2009, 3:56 AM (4 years ago)report abuse Send to a friend reply

bazzer (New user):

baz:
i am new to Linux .i have a vista on my dell and want to install kubuntu or any linux and have dual OS. i have done the partation using vista. i have around 5 partation now.they are as follows :os vista 250,recovery 10,f 100,g 100 and the last one is small dell related one. the four first one support NTFS system. Do i have to change that if i want to install linux ?
i tried installing it from a kubuntu cd but nothing work ?
What is my next step ? Can somebody advise me please ?
Cheers !!

10 January 2009, 4:03 AM (4 years ago)report abuse Send to a friend reply

seya (New user):

when I Restart the system using the Ubuntu Live CD, I can not find the "Try Ubuntu without any change to your computer" option, where is it? The first things I see are: This is the Ubuntu Live Cd.
Press f1 for help and advanced options.
For the default live system, press ENTER"
What way must I have go?
Please explain step by step

15 January 2009, 9:32 AM (4 years ago)report abuse Send to a friend reply

Samurai_47 (New user):

the only question i have is can i upgrade. that is XP -> Vista -> Win 7 Beta?

Thanks in advance.

23 January 2009, 10:12 PM (4 years ago)report abuse Send to a friend reply

jtokach (New user):

To get XP to use C:, boot your system with a USB pen drive connected. During the windows setup, instead of the Linux partition being assigned C:, the pen drive will get C:. Select the pen drive. Choose delete, it wont delete the pen drive data until you choose "L". Before pressiing L, remove the pen drive. Press L and you'll receive an error that the partition no longer exists, when you return to the selection list, voila, you can now assign C: to the empty partition.

24 January 2009, 5:12 PM (4 years ago)report abuse Send to a friend reply

vitallotus (New user):

Another easy way (if you don't have a flash drive) is once Windows XP is installed (and labeled something weird like G: or F:), shut down the computer and boot from the CD again. This time it will label the existing Windows partition as C:

Now just re-install windows again.

So yes, you have to install windows twice, but it doesn't take that long (an extra 7-15 minutes) and it's worth it to get it on C:.

14 October 2010, 6:44 AM (2 years ago)report abuse Send to a friend reply

custodian81 (New user):

This guide is fantastic - works seamlessly well even for a newbie.

03 February 2009, 7:54 AM (4 years ago)report abuse Send to a friend reply

pizzipie (New user):

Hi,

I tried this with my wifes Dell 1525 Inspiron w/ Vista. I know this article is about 8.04 but ..... The shrink partition thing worked fine. But ...

When installing 8.10 all it did was generate over a thousand Buffer IO SR0 errors and like stuff. I felt lucky that the whole Vista thing didn't blow up. It re-booted after I managed to get the disc out. I'm trying to figure out how to slipstream and all that stuff with XP but don't know how yet.

Ubuntu 8.10 works just fine with my Dell Latitude D800.

11 February 2009, 12:26 PM (4 years ago)report abuse Send to a friend reply

prakash (New user):

I have windows xp already installed on my PC and then i had installed Linux but i forgot have dual boot so when i start computer it directly switch to windows xp without asking about option of Linux or xp.

reply me on prakash_donga@yahoo.co.in

05 March 2009, 12:04 AM (4 years ago)report abuse Send to a friend reply

DrWilyBreen (New user):

Will this also work with Ubuntu 8.10?

13 April 2009, 5:13 PM (4 years ago)report abuse Send to a friend reply

DrWilyBreen (New user):

Will this work with Ubuntu 8.10?

15 April 2009, 8:56 PM (4 years ago)report abuse Send to a friend reply

The Penguin (New user):

Updated for windows XP SP3 and Ubuntu 8.04.
How about updating it for 8.10?
or wait eight days and update it for 9.04?

15 April 2009, 11:56 PM (4 years ago)report abuse Send to a friend reply

Dirky Danglar (New user):

I have created a NTFS partition in Ubuntu but when I try to install XP there is only one partition available to install it on, I suspect this to be the Linux one so I am unable to install XP. Any ideas please DD

16 April 2009, 1:37 AM (4 years ago)report abuse Send to a friend reply

EMBOLISM (New user):

Kudos for all useful guides,but have never had any problems in dual booting fedora core after loading windows xp first on a clean partition for which I use kanotix live cd installer and after allocating and saving partitions always remember to set fstab in partition manager....so simple my son is 12 yrs old and he can do it.
well done to all those that contribute to the advancement and enjoyment of free operating systems and applications.

09 May 2009, 6:43 AM (4 years ago)report abuse Send to a friend reply

jaya (New user):

hi to everyone..
i need a help... actually i have installed linux(ubuntu) in my laptop.Now i want to install install windows xp in my laptop.
i tried many times to install windows xp i cann't.
help me...

thanks
jaya

17 June 2009, 5:38 PM (3 years ago)report abuse Send to a friend reply

Ishkabible (New user):

whenever I enter "setup (hd0)" under GRUB configuration mode I get an Error 17 message and it automatically goes into XP when I start up

HELP

26 August 2009, 1:02 PM (3 years ago)report abuse Send to a friend reply

Ishkabible (New user):

whenever I enter "setup (hd0)" in the GRUB configuration mode I get an ERROR 17 message and I still automatically boot to XP

HELP

26 August 2009, 1:10 PM (3 years ago)report abuse Send to a friend reply

fld3 (New user):

I have a dual boot system with Linux and Vista. I need to reinstall Vista and don't know where to begin. When I boot into Vista, it comes up with the request for the authenication key. I need to go back to the Vista partition and re insall Windows Xp and then upgrade to Vista.
Any suggestions?

07 October 2009, 10:12 AM (3 years ago)report abuse Send to a friend reply

fld3 (New user):

I have a dual boot system (Linux and Vista). I need to reinstall Vista and I don't know how to get to the Vista partition to install XP and then upgrade to Vista. The system will boot to Vista but won't show the homepage. It asks for the authentication code which does work because I installed an upgrade version of Vista which requires installing XP first.

07 October 2009, 10:12 AM (3 years ago)report abuse Send to a friend reply

B.Rishi (New user):

how to install xp sp2 with linux red hat 5. Linux RH5 already in the machine. Please???

20 November 2009, 9:36 PM (3 years ago)report abuse Send to a friend reply

FETO (New user):

i have installe udubuntu at my PC and have not cd-rom
How to install XP?

29 December 2009, 2:10 AM (3 years ago)report abuse Send to a friend reply

jp071 (New user):

Hello, the following error occured when i entered setup command. here, root is (hd0,6). Anybody could help me.

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,6)/boot/grub/stage2
/boot/grub/menu.lst"... failed

Error 12: Invalid device requested

grub>




05 January 2010, 5:06 AM (3 years ago)report abuse Send to a friend reply

jp071 (New user):

Hello, Anybody could know about the error. in this case, root is (hd0,6).

grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,6)/boot/grub/stage2
/boot/grub/menu.lst"... failed

Error 12: Invalid device requested

grub>



05 January 2010, 5:12 AM (3 years ago)report abuse Send to a friend reply

win4ever (New user):

um...i tried with ubuntu 9.1

will it still work?
or is there no menu.lst?

11 February 2010, 5:10 AM (3 years ago)report abuse Send to a friend reply

win4ever (New user):

can i try this with ubuntu ver 9.1?

or is there no menu.lst?

thanks.

11 February 2010, 5:11 AM (3 years ago)report abuse Send to a friend reply

deekun (New user):

OK, I got to step 5
When go to this step:
ubuntu@ubuntu:`$ sudo grub
I get the following message:
sudo: grub: command not found

SO I can't continue from here... what can I do to continue?

21 February 2010, 8:25 AM (3 years ago)report abuse Send to a friend reply

deekun (New user):

Ok.. I realized that grub was not installed so I installed it.
Got to grub>root (hd0,0)
but after I entered setup (hd0)....
checking if "/boot/grub/stage1" exists...NO
checking if "/boot/grub/stage2" exists...NO

Error 15: File not found

I'm really new at Linux.. used to dabble in it but that was years ago... can anyone help me with the next step?

21 February 2010, 8:36 PM (3 years ago)report abuse Send to a friend reply

deekun (New user):

Realized it was too much work...
Loaded Windoze first with 1/2 size of HD partition and left rest blank.
Loaded Ubuntu 9.10 to next partition and chose option to which OS to load at HD startup... it worked flawlessly and took half the time.
So yeah... all the grub thingy is too hard to figure out for beginners... I'm glad it's easier now with Ubuntu 9.10

22 February 2010, 1:26 AM (3 years ago)report abuse Send to a friend reply

Berry (New user):

THE BEST TUTORIAL I EVER SEEN, are going to bookmarks thanks Guys

04 April 2010, 6:27 AM (3 years ago)report abuse Send to a friend reply

vikas rawat (New user):

How to dual boot Windows XP and Linux (XP installed first) roni_sam@yahoo.com

06 May 2010, 4:23 AM (3 years ago)report abuse Send to a friend reply

msm (New user):

I am trying to install xp sp3 using pxe boot. I share network folder (cd drive) from win xp desktop. I pxe boot netbook hp mini 1030 nr using tftp running on desktop. netbook boots and puts into a cmd prompt. I install marvell technology netowrk drivers and enable networking. I map network drive fine and can access cd.

I try setup.exe but the install option is grayed out. why ?

I try i386\winnt32 to bypass setup.exe and it starts the install process. I enter product key and it copies files. After that its supposed to install files but install exits and puts me back onto cmd prompt. why ?

I thought may be its was reboot time in the install process so I tried rebooting but this time I dont pxe boot it. So I get the grub prompt with debian only which is what is already on the netbook.

So I am not knowing how to proceed with xp install.

Regards,

MSM.
imiten@yahoo.com

08 July 2010, 4:23 AM (2 years ago)report abuse Send to a friend reply

msm (New user):

I am trying to install xp sp3 using pxe boot. I share network folder (cd drive) from win xp desktop. I pxe boot netbook hp mini 1030 nr using tftp running on desktop. netbook boots and puts into a cmd prompt. I install marvell technology netowrk drivers and enable networking. I map network drive fine and can access cd.

I try setup.exe but the install option is grayed out. why ?

I try i386\winnt32 to bypass setup.exe and it starts the install process. I enter product key and it copies files. After that its supposed to install files but install exits and puts me back onto cmd prompt. why ?

I thought may be its was reboot time in the install process so I tried rebooting but this time I dont pxe boot it. So I get the grub prompt with debian only which is what is already on the netbook.

So I am not knowing how to proceed with xp install.

Regards,

MSM.
imiten@yahoo.com

08 July 2010, 4:26 AM (2 years ago)report abuse Send to a friend reply

Ernst (New user):

Hello,

I recently wanted to install Win XP SP3 (Dell OEM CD) on a computer with opensuse 11.1 installed first and ran into several problems, which I could solve after some hours. So I'd like to share my knowledge, may help others.

After installing XP (first half, just copying files to hard drive, after that XP wants to reboot), I could not boot anymore. Due to a post in a forum I checked the partitions and found out, that two partitions were marked active (bootable) in the partiton table (this is not allowed, XP did not warn me, though it is supposed to). With PartedMagic I could turn on partition off (Windows Recovery Console fdisk might have worked too). I then restored the grub bootloader into the MBR (opensuse usually prefers to install grub in the partition, aargh). Still could not boot XP, had to start the Recovery Console from XP CD, "fixboot c:\" restored boot sector and system files in the XP partition (I guess, XP installed boot sector and system files in the MBR at first). Though advertised in some forums, "fixmbr" or "fdisk /mbr" on Recovery Console did not help in that situation, it just restores the Windows MBR.

05 August 2010, 11:50 PM (2 years ago)report abuse Send to a friend reply
18 September 2010, 2:56 PM (2 years ago)report abuse Send to a friend reply

SteveM (New user):

I found this advice didn't work for me...
(a) the Grub command line would not accept "root (hd0,0)" - it rejected hd0 as a device even though it was listed in the file of Grub devices. I ended up having to re-install Ubuntu.
(b) Setting the default o/s to boot didn't work either. I found I needed to edit /etc/default/grub and choose the default OS from there, and then run update-grub and finally it worked.

Hope you find this additional information useful.
Kind Regards
Steve


28 September 2010, 8:05 AM (2 years ago)report abuse Send to a friend reply

SteveM (New user):

I found this advice didn't work for me...
(a) the Grub command line would not accept "root (hd0,0)" - it rejected hd0 as a device even though it was listed in the file of Grub devices. I ended up having to re-install Ubuntu.
(b) Setting the default o/s to boot didn't work either. I found I needed to edit /etc/default/grub and choose the default OS from there, and then run update-grub and finally it worked.

Hope you find this additional information useful.
Kind Regards
Steve


28 September 2010, 8:06 AM (2 years ago)report abuse Send to a friend reply

Nimmy Chohan (New user):

so is it something like that; when ever i'll be connected to internet i'll be connected to the OS(of open source???)
.
.
.
will it won't disturb my own OS..????

05 October 2010, 9:24 PM (2 years ago)report abuse Send to a friend reply

luisarcher (New user):

when i write the command in the terminal, its opens an empty file without anything wrote on it. so im asking if anyone knows why??
thanks

19 December 2010, 12:58 PM (2 years ago)report abuse Send to a friend reply

99 (New user):

i dnt even hav a menu.lst on my ubuntu 10.04 ?

14 January 2011, 3:24 AM (2 years ago)report abuse Send to a friend reply

View all comments (153)  

anonymous user Anonymous user

APC May 2013

May 
APC
out now!

Tags