need to fix grub after update to ubuntu 11.10 on dual boot 2nd sys win7 64 bit

Asked by redprosumers

I recently updated ubuntu and it said that legacy was not compatable. I tried to update it but end result is I can't access my ubuntu system after the updates. the boot load menu is gone so I can't choose which system to use. I am using win 7 64 as my 2nd system how do I fix it.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chris (fabricator4) said :
#1

It kind of sounds like you have inadvertently run the OEM Windows recovery partition. If you can access Windows but get no grub boot menu this is the most likely scenario.

The following instructions should allow you to re-install grub and get going again:

========================8<---------------------------------------
If you run the Windows installer after installing Ubuntu, it will overwrite the grub bootloader with the Windows MBR (Master Boot Record). Windows likes to think it is the only operating system on the planet. :-/

What you need to do is boot the LiveCD and chroot into the Ubuntu system, then re-install grub2

First thing to do is identify what the device name of the Live file system is. In most cases this will be /dev/sda, especially if it's the only hard drive in the computer.

A little more complicated is to identify which partition Ubuntu lives on. This will depend on exactly how you installed Ubuntu so it's best to check and be sure. Once you've booted the LiveCD use either Disk Manager or Gparted to look at the hard drive and identify the Ubuntu root (/) partition that you set up. You would be looking for an ext4 partition of the correct size.

For the purposes of these instructions I'm going to assume the correct device (drive) is /dev/sda and that the partition is /dev/sda3. You should substitute the correct device names as appropriate.

Firstly, mount Ubuntu root partition:

sudo mount /dev/sda3 /mnt

Next, export the LiveCD filesystem to the root filesystem on the drive:

sudo mount ‐‐bind /dev /mnt/dev
sudo mount ‐‐bind /proc /mnt/proc
sudo mount ‐‐bind /sys /mnt/sys

Now change the root filesystem to the hard disk:

sudo chroot /mnt

Now re-install grub2 to /dev/sda

sudo grub-install /dev/sda

At this point you could reboot and it should allow you to boot into Ubuntu, however if Windows was installed after Ubuntu then it may not know about the Windows OS yet. To fix this run update-grub:

sudo update-grub

and it will find all OS's on your system and add them to the grub menu. You can now reboot and enjoy your dualboot system:

sudo reboot

:-)

========================8<---------------------------------------

Chris

Can you help with this problem?

Provide an answer of your own, or ask redprosumers for more information if necessary.

To post a message you must log in.