I use Ubuntu 9.04 as my desktop and I was planning to install Windows 7. As my Ubuntu is already set, I don’t want to format it and install Windows and again re-install Ubuntu. So, I was googling on what should I do and got this. Re-iterating the same in my words:

I would assume that you would like to use Grub as the boot loader and don’t want to use Windows’.

What we are going to do with the bootloader (No big deal):

  • Allow windows to over-write the exiting bootloader
  • Rewrite the bootloader of windows with Grub
  • Create a reference to Windows in Grub

All you need to have is a live-cd of Ubuntu and a kool head to do this job.

Phase 0:

  • Install Windows 7. Guess u know how!!!. (Otherwise you might not be looking for this.)🙂

Phase 1:

  • Boot from the live-cd
  • Open the terminal
  • Invoke grub as root
  • sudo grub

  • Execute the following commands in grub prompt
  • find /boot/grub/stage1
    (This will give you where the grub bootloader resides.)
    root (hdX,Y)
    (Where, (hdX,Y) is the output of previous command. We set this as root )
    setup (hd0)
    (Install Grub)

Phase 2: (Final One)

  • Open /boot/grub/menu.lst in your favorite text editor.
  • Add the following lines:
  • title Windows 7
    root (hd0,1)
    chainloader +1

  • Save this file and reboot
  • You are done 🙂

If this didn’t allow you to boot Windows, in menu.lst file, try changing root (hd0,1) to (hd0,0) or (hd0,2) till you get it working.

And, your Ubuntu and Windows will live happily ever after in your HDD. (Effect of reading fantasy novels recently :D)

I am assuming that this should work on any other distributions of Linux and Windows combination. I haven’t tried though!! If you got an opportunity to try, leave ur observations as comments.