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.

This isn't the first time I've installed ubuntu. The first time I had ubuntu and w7 booting from the same drive (worked fine using conventional tricks). This time I am booting from a separate hard drive (not so good this time).

Now. I have w7 installed first on my main ssd. Then had ubuntu installed on a separate hard drive. After installing ubuntu 10.10, grub2 didn't show, so I went ahead did the conventional methods of recovering grub, as listed on this website: https://help.ubuntu.com/community/Grub2#Reinstalling%20from%20LiveCD

I tried both method 1 and method 2. No errors on both. I get something along the lines of "Installation complete. No Errors." Then I reboot. Loads straight to Windows, no grub menu

//My linux drive is sda5//My W7 is on sdb//

-I tried shift on bios, no good.

The only method that worked was using Super Grub2. I dont like the idea of putting in a cd to start linux every time.

My question is, are the conventional methods the wrong way to go, because ubuntu is installed on a separate hard drive? Also, note there are no errors when I do method 1 and method 2.

share|improve this question

2 Answers 2

up vote 1 down vote accepted

I never got in trouble by using these instructions:
https://wiki.ubuntu.com/Grub2#Recover

First of all, you must start your system from a live cd. Then

"METHOD 3 - CHROOT

This method of installation uses the chroot command to gain access to the broken system's files. Once the chroot command is issued, the LiveCD treats the broken system's / as its own. Commands run in a chroot environment will affect the broken systems filesystems and not those of the LiveCD.

1) Boot to the LiveCD Desktop (Ubuntu 9.10 or later). Please note that the Live CD must be the same as the system you are fixing - either 32-bit or 64-bit (if not then the chroot will fail).

2) Open a terminal (Applications > Accessories > Terminal).

3) Determine your normal system partition - (the switch is a lowercase "L")

sudo fdisk -l

If you aren't sure, run

df -Th  

Look for the correct disk size and ext3 or ext4 format.

4) Mount your normal system partition:

Substitute the correct partition: sda1, sdb5, etc.

sudo mount /dev/sdXX /mnt  

Example: sudo mount /dev/sda1 /mnt

5) Only if you have a separate boot partition: sdYY is the /boot partition designation (for example sdb3)

sudo mount /dev/sdYY /mnt/boot 

6) Mount the critical virtual filesystems:

sudo mount --bind /dev  /mnt/dev
sudo mount --bind /dev/pts  /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys 

7) Chroot into your normal system device:

sudo chroot /mnt 

8) If there is no /boot/grub/grub.cfg or it's not correct, create one using

update-grub 

9) Reinstall GRUB 2:

Substitute the correct device - sda, sdb, etc. Do not specify a partition number.

grub-install /dev/sdX 

10) Verify the install (use the correct device, for example sda. Do not specify a partition):

sudo grub-install --recheck /dev/sdX 

11) Exit chroot: CTRL-D on keyboard

12) Unmount virtual filesystems:

sudo umount /mnt/dev/pts
sudo umount /mnt/dev
sudo umount /mnt/proc
sudo umount /mnt/sys 

13) If you mounted a separate /boot partition:

sudo umount /mnt/boot 

14) Unmount the LiveCD's /usr directory:

sudo umount /mnt/usr 

15) Unmount last device:

sudo umount /mnt 

16) Reboot.

sudo reboot 
"

share|improve this answer
    
Excellent answer. –  boehj Apr 28 '11 at 1:57
    
Thanks method 3 did solve the problem of getting grub2 to show. I also discovered that fdisk -l was incorrectly stating my harddrives. fdisk stated that my W7 drive was /dev/SDB, but when I checked grub.cfg, it was actually /dev/SDD. –  fair_data Apr 28 '11 at 5:38
    
I'm glad it work. I've never seen it fails ;-) –  desgua Apr 28 '11 at 12:16
    
Just a note, when executing step 10: sudo grub-install --recheck /dev/sdc Received mssg: "sudo: unable to resolve host ubuntu /usr/sbin/grub-setup: warn: Sector 33 is already in use by FlexNet; avoiding it. This software may cause boot or other problems in future. Please ask its authors not to store data in the boot track." Anyway it finishes with the usual: installation finished. No error reported. So I will try your solution till the end and get back with the final result. –  user73132 Jun 25 '12 at 12:59
    
Nop :( didnt work for me. Is there an "update-grub" missing? –  user73132 Jun 25 '12 at 13:20

On which drives did you install grub? Try to install grub to /dev/sda and also to /dev/sdb (and whatever drives you also have).
May it be possible that you installed it to /dev/sda5 or something like this? Or you installed it to /dev/sda and the bios boot-order prefers /dev/sdb with existing win-loader?

share|improve this answer
    
I have only tried sda5 because that is the Linux drive. My sda drive was partitioned so it can be used on windows as well. And as for you second question. I do believe that sdb is the preferred boot-order. I suppose it would make sense to try it in sdb. Should I be trying sdb(the entire disk) or sdbX the partition of windows. There is also the 100meg recovery partition under sdb. –  fair_data Apr 26 '11 at 16:26
    
I tried both my partitioned linux drive, sda/sda5 and my w7 boot drive sdb/sdb2, no good. Goes straight to W7 at start up. So far the only method that seems to work is Super Grub2, which is annoying. –  fair_data Apr 27 '11 at 2:05

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.