I just installed a fresh Ubuntu 12.04 and during install selected to have grub put on it's own partition for the boot device since I use the Windows 7 boot manager for my booting. I also boot Ubuntu version 10.04 with the 7 and 12.04. I use Easy BCD to configure the boot menu, and did add in my new 12.04, but when I select it to boot it re-directs to the 10.04 grub menu. So I added the 12.04 in the neo-grub option in Easy BCD which now does boot up 12.04. I did try to run; grub-install /dev/sda7 in a terminal which failed due to the use of blocklists. The 12.04 is on sda7, 10.04 on sda6, and windows 7 is on sda1. So how can I install a working grub 2 onto the root partition of 12.04 so it can be booted directly ?

December 2nd, 2012

Karlchen

Re: new 12.04 install grub 2 boot problem

Hello, James2b.

About forcing Grub to install into the boot sector of a partition:

Code:

sudo grub-install --verbose --force /dev/sda7

This will force Grub to install into the boot sector of the partition /dev/sda7.

About limits imposed by EasyBCD

To the best of my knowledge (based on my own experience) EasyBCD will only see and add to the Windows bootmgr boot menu a single Linux installation.
By default this will be the first Linux installation on the disk. But as you have found out, it can also be the second one.

Your setup seems to be pretty similar to mine (except for the versions and the exact partition numbers):
(1) Windows 7 on /dev/sda1
(2) Ubuntu 12.04.1 on /dev/sda5
(3) Linux Mint 13 on /dev/sda6

By using EasyBCD booting Linux Mint - second Linux installation - would work like this:
(1) Windows bootmgr chain boots the boot sector of /dev/sda5
(2) This brings up the Ubuntu 12.04 Grub boot menu
(3) From where Mint is selected and launched by the Ubuntu 12.04 Grub

Workarounds:

The easiest way out of this situation is by installing Grub2 into the MBR of /dev/sda and by making the Grub menu offer to launch all 3 OSes.
A simple

Code:

sudo update-grub

should be sufficient to achieve the goal.

The more complicated way is by making the Windows bootmgr do this job.

It is more complicated, because Windows bootmgr cannot pass control to Linux Grub. Instead it has to chainload the boot sectors of /dev/sda5 or /dev/sda7.

bootmgr cannot address /dev/sda5 or /dev/sda7 because Windows does not understand ext4 filesystems. So we have to create copies of the 2 boot sectors of /dev/sda5 and /dev/sda7, put the copies as files on drive C:

This reads much more complicated than it really is.
Basically for each Linux distribution which you want to add to the Windows 7 boot menu you follow these steps carefully: Howto boot Linux from Windows 7 Boot Manager
(Make sure you modify the given commands to match your environment or you may mess up your Windows boot menu.)

Kind regards,
Karl

December 2nd, 2012

oldfred

Re: new 12.04 install grub 2 boot problem

While a few report EasyBCD works, understand that with grub2 using blocklists you may have issues with grub.

Grub normally has code to search for the rest of grub in the partition with /boot where the rest of grub is. But when using blocklists it has to hard code the address on the drive where the code is. Then if the code moves from an update or even a fsck then grub is broken and will need a reinstall.

So it works, but be prepared to reinstall grub after major updates as you have a workaround to use EasyBCD.

December 3rd, 2012

james2b

Re: new 12.04 install grub 2 boot problem

Okay thank you for that. I can now boot my new 12.04 with the neo-grub option in the Easy BCD, which brings up the Ubuntu 12.04 grub2 menu. I also added in a chainload boot from the 10.4 to the 12.04, which I will attempt, and then try that force install if needed.

December 4th, 2012

james2b

Re: new 12.04 install grub 2 boot problem

Yes I can now chainload to the 12.04 grub, from the 10.04 grub 2, and does show the 12.04 boot options and my others too.

=> Windows is installed in the MBR of /dev/sda.
=> Grub2 (v1.97-1.98) is installed in the MBR of /dev/sdb and looks at sector
1 of the same hard drive for core.img. core.img is at this location and
looks in partition 3 for /boot/grub.

As you can see the grub2 installed to the PBR - partition boot sectors look for core.img by sector. If that gets moved for any reason then you have to reinstall grub to the PBR so grub can then find the new core.img.

As long as you have a current working liveCD or flash drive of Ubuntu and a Windows repair CD or flash drive you should be ok.