Configure grub for dual boot

Project:Linux software
Component:Documentation
Category:support request
Priority:critical
Assigned:Unassigned
Status:active
Related pages:#189: GRUB
Description

How to configure grub for dual boot.

Friends bought a computer with winnnndoz preinstalled and they wished to dual boot with Linux. I installed kubuntu using windows' original D: drive. Now, the computer only boots linux. I want the default to be windows and a choice menu to be displayed whenever we boot.

Comments

#2

grub appears to be properly configured, but the grub menu does not appear during the boot process. It seems to be a graphic card configuration problem:
#206: VIdeo card configuration problems.

So, now, my problem is that the computer is configured to boot windows, and since the grub menu does not appear, I cannot select linux. I need to figure out how to boot linux so that i can investigate the graphic card problem.

#3

#4

What I did:
following:
http://www.dedoimedo.com/computers/grub-2.html#mozTocId842078

mount /dev/sda5 /mnt/linux
cd /mnt/linux/etc/default/
vi grub
GRUB_DEFAULT=2 (7 = windows 7)
grub-install --root-directory=/mnt/linux /dev/sda

#5

above didn't work.
It still booted windows.

vi /mn/boot/grub/grub.cfg
set default="2" (it was still 6)

grub-install --root-directory=/mnt /dev/sda

#6

boot/grub/grub.cfg
set default="1" => linux recovery.
2 => windows recovery.
4 => memtest.
6 => windows.