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.
- Install Windows 7. Guess u know how!!!. (Otherwise you might not be looking for this.)🙂
- Boot from the live-cd
- Open the terminal
- Invoke grub as root
- Execute the following commands in grub prompt
(This will give you where the grub bootloader resides.)
(Where, (hdX,Y) is the output of previous command. We set this as root )
Phase 2: (Final One)
/boot/grub/menu.lstin your favorite text editor.
- Add the following lines:
- Save this file and reboot
- You are done 🙂
title Windows 7
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.