This is just guide what I did for the recover my Ubuntu after install Windows in my HD as dual boot. I know this is a most common problem after you install Windows.
I did this process for Ubuntu 9.10 which is grub version 2. Previous grub versions recovery options are different.
1. Use your Ubuntu 9.10 Live (Installation media) CD/DVD and boot your system.
2. Then get the gnome-terminal and type following
$ sudo fdisk -l
This will give your current partition information in your system, for my system,
/dev/sda1 29 8369 66999082+ 83 Linux
/dev/sda2 * 8370 13995 45190845 7 HPFS/NTFS
/dev/sda3 13996 14593 4803435 5 Extended
/dev/sda5 13996 14593 4803403+ 82 Linux swap / Solaris
3. For my system Linux file system is under /dev/sda1
I’m going to mount this partition to under /mnt directory.
$sudo mount /dev/sda1 /mnt
$sudo mount --bind /dev /mnt/dev
$sudo mount --bind /proc /mnt/proc
4. Now do the chroot to our location which we made under /mnt
sudo chroot /mnt
5. As you can see that your $ change to # and you don’t want to use sudo any more for the administrator privileges.
Please note that it should be “sda” (according to your disk)
If there any error message type,
#grub-install --recheck /dev/sda
6. Now exit from the chroot and umount the drivers, and then reboot your system.
$sudo umount /mnt/dev
$sudo umount /mnt/proc
$sudo umount /mnt
7. Now you can see when the system is rebooting it will gives you grub menu. Sometimes even if you select windows system it not booting up and it will gives you some error messages.
From your grub menu select error recovery mode.
Insert your Ubuntu CD/DVD then run grub repair option.
Then reboot your system and then Windows environment and Ubuntu system’s are available for you