Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I first installed windows 7 in a partition. Then installed ubuntu in another partition. But i am not able to choose between those 2. It is directly going into windows 7. Please

share|improve this question
1  
Did you install Ubuntu using an USB drive? If so, GRUB may be installed in the USB rather than the hard drive. Try booting with the same USB drive plugged in, and edit the question with the results. –  user68186 Oct 26 '12 at 13:37

1 Answer 1

You need Ubuntu 10.10 livecd for repairing grub boot loader . Here assuming the Ubuntu partition is sda7. Boot up ubuntu from the livecd,open terminal and run:

sudo fdisk -i

and see what is your linux partition and note it I assume it sda7 here.

mount /dev/sda7 /mnt

mount /dev/sda7 /mnt/boot

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

mount --bind /proc /mnt/proc

mount --bind /dev /mnt/dev

mount --bind /sys /mnt/sys

chroot /mnt update-grub

umount /mnt/sys

sudo reboot

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.