Monday, March 8, 2010

How to dual-boot ubuntu 9.10 and windows7(ubuntu 9.10 installed first)

Installing any windows based operating system on Linux is not so easy, because windows bootloader eats up GRUB(Linux bootloader). Hence it is recommended that while dual booting your system with windows and Linux you should first install windows operating system. But if you have installed windows first then no need to wipe out your whole hard disk.

On installing any windows operating system on any Linux destro Windows bootloader completely overwrite GRUB, therefore we need to reinstall GRUB.
Steps for reinstalling GRUb are-

Boot from the ubuntu live cd and go to terminal.
Type in terminal:

"sudo grub"
"grub> find /boot/grub/stage1"

That should return your Ubuntu partition in the form of (hdX,Y), use that:

grub> root (hdX,Y)
grub> setup (hd0)
grub> quit

(you don’t need to type the grub> bit)

That has re-installed grub but you can no longer see windows7

  Edit grub.
Go to terminal from normal ubuntu and type :

“sudo gedit /boot/grub/menu.lst”

A large text file will open and at the bottom leave a line and add this:

title windows 7 beta (Loader)
root (hd0,1)
savedefault
makeactive
chainloader +1

(Do not type this line but if that does not work on re-boot try “hdo,0 or hd0,2” and so on until it works.)

0 comments:

Post a Comment