How to recover Ubuntu after installing Windows 7

My primary OS of choice has been Ubuntu Linux for the past 2 years. Although I cant seem to ween myself away from Windows entirely. I recently installed Windows 7 on my desktop PC and after rebooting my Ubuntu Grub boot loader had disappeared… this is how I fixed the problem and got myself back to dual booting both Ubuntu and Windows 7.

First you need to boot off an Ubuntu Live CD so pop that in your CDROM drive and reboot. When the menu comes up choose ‘try Ubuntu without installing‘. After everything loads and you have the desktop screen up. Click on ‘Applications‘ at the top and scroll to ‘Accessories‘ then go down to ‘Terminal‘ this will load a box with a prompt for you to type in commands.

here is what you need to enter for commands in order:

  • sudo grub [enter]
  • find /boot/grub/stage1 [enter]

(then whatever comes up for data use that in the following)

  • root (hd?,?) [enter]
  • setup (hd0) [enter]
  • quit [enter]

then reboot and your Ubuntu Grub should be back.