You're going to have to boot from a live CD, run sudo gparted
, resize your Ubuntu partition for room for XP, then [optional] create a NTFS for XP. [Edit: If you're a total n00b, here is a link to a gparted tutorial: http://www.dedoimedo.com/computers/gparted.html ] :)
Then you boot from the XP cd, select the partition [or if you didn't create one, tell it to use unallocated space].
Once that installs, you are going to have to reinstall the GRUB bootloader. If you have grub legacy, I know how. If you have grub-pc [the new one, aka grub 2 I think], I'm not exactly sure how, but a quick google search should tell you.
To reinstall the bootloader you again will have to boot from a live CD and run some commands on the terminal.
For legacy grub: sudo install-grub /dev/sdX
And you may want to run sudo update-grub
, [But you probably should backup /boot/grub/menu.cfg
first] and hopefully it will find your XP installation and add it to the menu. If not you will have to manually edit /boot/grub/menu.cfg. sudo gedit /boot/grub/menu.cfg
If GRUB finds your windows XP automatically, you're done.
Find the part where it mentions chainloading, [it's commented out] and copy that part, and paste it next to your Linux entries. Then just replace the "root (hd0,0)" line: hd0 means the first disk [sda], the next 0 means the first partition. So if your XP partition was /dev/sda4, your line would look like "root (hd0,3)" because the number starts at 0, not 1.