I think I can tell you why it happened, not sure exactly how to fix it though. When you install an OS it installs it's boot loader on the partition that is marked active regardless of what partition the OS is installed to. When you installed Ubuntu it installed its boot loader Grub. Grub was smart enough to see XP and added it as a boot option. Formating the partition Ubuntu was on didn't remove the boot loader because it (Grub) was on a different partition. Now as far as Microsoft operating systems go the general rule of thumb is oldest first. Ignoring Grub for the moment, when you install Windows 7 it replaces the XP boot loader with it's own and adds XP as a boot option. Assuming you installed windows 7 to a partition other than the one XP was on. If you install XP again it wipes out the windows 7 boot loader and you loose the option to boot to windows 7. Since you installed XP twice (you didn't remove the original version) you end up with two installs and two boot options, one for each install. I don't know how to remove Grub. To fix the two XP entries you would normally do this, but in your case I don't think you want to do it. After you format the partition with the XP you don't want boot into the one you want to use. Them run msconfig. Go to the boot.ini tab and click the "Check All Boot Paths" button. This would remove the bogus entry. I don't think this will add Windows 7 though. To fix the missing windows 7 boot loader I think you would have to boot from the windows 7 DVD and do a repair install. Now the big problem as I see it is if that original XP install you don't want is on the active partition you will wipe out the boot loader when you format it and not be able to boot into any OS. If it was me I would wipe everything and just start over. I think what ever you do it's just going to go from bad to worse.