After reinstalling Windows in the computer dual boot with both Windows and Ubuntu Linux,you need restore grub because mbr has been rewritten.This tutorial shows how to restore grub 2.
Update:Today I ghost my XP system,but after restore grub,I cannot boot into XP by clicking the old windows option in grub menu.So you’d better to run this command to renew the grub2 boot list after trying following method:
Using Ubuntu LiveCD/LiveUSB and boot-repair (gui tool).
If you have the LiveCD or LiveUSB you installed Ubuntu from, insert into your machine and boot from it. Then run 3 commands into terminal (Ctrl+Alt+T) to install boot-repair:
sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair
If you don’t, directly download boot-repair.iso file and burn into liveCD or liveUSB (UNetbootin) then boot from it.
Open boot-repair, click Recommended repair to repair grub2 with one click. Click Advanced options for details.