Here is a small step-by-step guide to rescuing Linux after installing XP, so that newbies like me don't have to suffer for hours
I have Red Hat 7.3 and installed XP about two hours ago. During installation, it warned me that there was another OS on an active partition in the HD (that was Linux), and that it would mark that partition as inactive. Linux wasn't actually deleted, that was just XP setting itself up to be the only system to boot up when the computer is turned on.
After XP is installed and properly configured, do the following to get Linux back:
1) call up XP's command prompt.
2) type "diskpart". This will call up XP's partition manager.
3) on diskpart's prompt, type "list disk". This will list all the HDs on your machine. Note which of them is bearing Linux (you can probably guess from the size). If there is only one disk, this is obvious
4) type "select disk X", where X is the number of the HD containing Linux.
5) type "list partition", to see the list of partitions. Note which one is the /boot partition (again, you can guess from the size).
5) type "select partition Y" where Y is the number of the /boot partition.
6) type "active".
This will set up Linux's /boot partition as the first one executed when the computer starts. When you reboot, you'll have Linux back, but won't be able to boot up XP. What you have to do now is add it to GRUB. I'm using GRUB here because that's what I have - if anyone wants to help with the LILO alterations, go ahead
To set up GRUB:
1) Find it's config file, "menu.lst" . This will probably be /boot/grub/menu.lst .
2) Add the following lines to the end of the file (but see the notes first!):
title Windows XP
root (hdX, Y)
Notes: replace X with the appropriate number for the HD containing XP (this is 0 if you have only one disk), and Y for the number of the partition containing XP's boot loader. This will probably be the number listed in diskpart -1 : if diskpart listed XP's partition as being "3", then Y is 2.
3) Reboot your computer. If everything went all right, your should see the GRUB menu with a new option for loading Windows XP, and will have access to both systems.
(Edit: removed the "makeactive" line from the GRUB configuration commands. It would put you back at square one).