Install Windows XP after Linux


Can anyone advise if it is possible to install Windows XP after Linux in one PC? If yes, how?

Who is Participating?
I feel that I should fix my above answer as it is more than a bit unclear (must have needed more sleep that night).

This is assuming that you have XP already installed on a drive.

1.) Place a second drive in the machine in the "slave" position.  This can be any drive, new or old.  I say use a second drive because it is much easier than purchasing a piece of software which moves data (with potential loss) and drive partitions to create a second "wall" on an existing hard drive.  This can be risky (the software almost always tells you to back up your drive before you start), and the software can cost you almost as much as a new drive.

2.) Boot your computer with the Linux CD in the drive.  Make sure that your bios is set to check the CDROM BEFORE it checks hard drive.  Usually, you will get a "press any key to boot from CD . . . " message during which you need to strike a key on the keyboard or the system will boot normally.

3.) Follow the installation though to where it begins talking about installation location.  This is where you need to know for certain which drive is master, and which is slave.  If you don't know, exit and check out the drives in bios.  
     Assuming that the second (soon to be Linux) drive is slave, select Hd1 and have the disk create the necessary partitions automatically if there is the option.  You can create them manually, but unless you have experience sizing Linux partitions (boot, swap, /) I would avoid this.  
     If it really makes you nervous, just think, the new drive should have no partition information on it.  The Windows drive has an NTFS structure.  Relax, study the information, and make sure that you chose the right drive.

4.) Somewhere in the installation, it will ask you what other OS's you would like to boot.  This will be simple as it is just Windows and Linux.  They make it easy, just follow the directions.

5.) Select the software packages that you want (you can always add them later if you chose from one of the standard packages) and "OK" your way though until the files begin to be copied.  Sit back and relax.  You will have to swap CD's occasionally as Linux provides you with so many programs that there are usually 3 disks to the set (Common Microsoft!)

-When the system is though, it will reboot, and you will see a screen that is new.  This is the bootloading program (probably LiLO or Grub) that Linux installed.  It will ask you to choose which OS you would like to boot into . . . Windows . . . or LINUX!!!

It is possible to install dual operating system on one pc even after installation of one of the operating syatems. Your question was not clear enough if you wanted to install only the XP after reformation of the hard drive that has Linux on? or if you want to have 2 OS on one computer.
If you want to have dual OS:
If you go to the installation options of Linux it will ask you to partition your hard drive
Do 2 partitions and spcify the space for each. You should spacify more space for XP
If you Just want to have XP:
Put your XP Cd in the cd drive and follow the instructions.
Hope that will help
exchangesmithAuthor Commented:
I meant there is Linux running in the PC already, and I want to install Windows XP on top of Linux.

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

if you have a choice, its easier to go the other way..  windows first on part 1 of the drive, and linux on part 2..

(not meant as an answer,  just an observation)

exchangesmithAuthor Commented:
yes, but I am looking for a way to keep my existing Linux...

You need to have a partition available for install of XP.  So if you have a 60 GB drive and you linux is using all 60 then you will have to get a program to repartion your drive to give XP probably something like 10 GB.

One you have your free partition you will boot into the XP CD and then when you get to the part of the format the disk you will see the partitions that are on the drive.  Make sure to take great care and look at the size of each and pick the one that you know is the partition you wanted to install XP on or you will wipe out your linux on it.

Once you select the partition you will then format it NTFS or what ever and then you are off.

Now once you boot up you might have to do a repair on the linux side because you  want your boot loader to be something like grub or lilo so you will have to do a repair.

As tanelorn said it is much easier to install Linux after XP has been installed.

My suggestion would be to start over from scratch and install XP first and when you get the formating part for the drive just allocate what you want to give XP and the remainder will be used for Linux.  This is the way I installed it on my laptop and it works beautifully.

Good Luck and let me know if I can be of further assistance.

As almost everybody has almost said XP wont allow you to have something non-windows running beneath it...

Its not that it wont install ok, because it will, its the bootloader which is the problem.

Here's what would happen in your case.
You've got linux installed with grub or lilo as the bootloader and all works fine.
You install Windows to another partition and windows install's its bootloader in place of lilo/grub.

Now the thing is as the bootloader cannot recognise linux as being there (more to say it doesn't give a damn) it wont allow linux to be a choice on the bootloading process mainly because the partition is incoded in non windows format and it just confuses it.

If you did things the other way around, you would start with windows's bootloader, which would get overwritten by lilo/grub and because they can both understand that windows is there and you might want to use it, it will allow you to boot to it.

One option that might be available to you is making up a linux boot CD, with the lilo/grub files or some config exec for installing it with the right config, installing windows to another partition, allowing the bootloader to install over lilo/grub, but then booting to your magic CD, and manually reinstalling lilo or grub as the main boot loader - and configuring it so it can also boot to the evil evil windows partition if it likes.

Another method would be to have 2 HDs and have windows on one and linux on the other, and change the boot sequence in BIOS each time you want to change.... I did that for a year and it was slightly painful with all the extra restarting but i coped.
I think if he installs XP then the next boot up he will have to boot into the linux cd and do are repair on it in particular a repair on just the grub or lilo which ever he is using.  This should over right the windows stuff again and give you the options in the boot up that you want with windows included as an option.
Windows wont automatically be an option in his lilo/grub settings as they werent put in there by his distro's installer whe linux was installed. they will have to be configured manually but shouldnt cause too much pain or misery.
There is one thing that I haven't heard suggested, and that is, "get a second hard drive."  This is by far the easiest approach as you will not have to worry so much about the booting options.

1.) If you do not have Webmin installed yet, for gosh sakes get it.
2.) Make the second hard drive "master" and install XP normally
3.) Return the Linux drive to Master (as the Linux bootloaders are far better at dual booting than Microsofts--no surprise there).
4.) Boot to linux, and enter Webmin (if on the local machine, go to http.localhost:10000)
5.) Click the hardware tab
6.) Click the icon for either Lilo or Grub (whichever you are using)
7.) add a new boot option for XP--Remember, the master drive is typically hd0 and the secondary hd1

Save and reboot.  you might have to play with the partition choice under the boot option (in Webmin) that you just made in order to get it right for XP, but you should now have an XP choice and a Linux choice, at least.
after the windows install you have to boot from a linux booddisk in and add an entry for windows to your lilo conf then run lilo from your hard drive this will restore it.
i dont know mutch about other distros but for a debian system: select rescue root as boot type and mount the boot partition.
just install it on another partition

you wont be able to boot to linux then
so get any 3rd party boot manager
I suggest PowerQuest BootMagic

try to get it from PowerQuest website
>> This is assuming that you have XP already installed on a drive.
This is not the case! Read the question before making a mammoth post!

>> I suggest PowerQuest BootMagic
BM Is now owned by Symentec, and is currently not being sold as they rebrand it.
OliWarner, are you a rep for this company.  Then why the smack.  Lay off the coffee man (it makes reading a couple of paragraphs worth of text much easier, trust me).

I appologize for missing the actual direction of the thread, but what I said about dual drives still stands.  Much easier.  Just install XP on a second drive and then follow Nicholas1's advice.
Yeah sorry - I've just been through 6 threads that i'm in and the latest posters had all just ignored/misread the initial question... this thread was at the end of my purge so i guess i must have been a little overzealous to smite you... sorry again...

Yeah exchangesmith should be able to get around this either with some tender partition resizing or buying another HD and letting windows destroy that instead... then just configuring Lilo to allow boots to windows, or reinstalling linux over the top of the current linux installation, which should detect that windows is now there and should upgrade lilo sufficiantly...
I have exactly the same situation.

I installed win xp after ubuntu linux. One hd, but two different partitions

I am thinking of using a new boot manager (win) to see if I can fix all this.

Other option is to run grub from a cd and see if it can fix its counterpart installed in the hd.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.