[SOLVED] Installing GRUB2 on BR instead of MBR

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

[SOLVED] Installing GRUB2 on BR instead of MBR

Postby airscorp on Sat Feb 06, 2010 12:52 am

A big hello to the community, since this is my first post here.

Just for background info:
I've found through much pain that the motherboard of my new laptop doesn't like probably any MBR other than the Win7 MBR it came with. I'm planning on a multi boot system with Win7, FreeBSD and Linux Mint Helena. I want to try using the partition boot records of each installation for chainloading. Whether this is a good idea or too much fuss to bother is another topic, but I'm doing it mostly for the experience.

The question:
I want to install Mint 8's GRUB2 on the BR of the installation partition (it will be a logical partition if it makes a difference), without touching the MBR. From what I gather, using the advanced button in the last step of the installation and selecting my installation partition for GRUB should do exactly that. Problem is I couldn't find a definitive answer in my searches about how exactly this option works, so I need some clarification. Am I in the right track?

Thank you!
Last edited by airscorp on Wed Feb 10, 2010 8:30 am, edited 1 time in total.
User avatar
airscorp
Level 1
Level 1
 
Posts: 10
Joined: Sat Feb 06, 2010 12:28 am
Location: Patras, Greece

Linux Mint is funded by ads and donations.
 

Re: Installing GRUB2 on BR instead of MBR

Postby Fred on Sat Feb 06, 2010 1:42 am

airscorp,

You should be able to accomplish this without too much effort. Let's assume you have Windows installed and working using the entire drive.

First, defrag your Windows install at least twice. Then shrink the Windows partition to whatever you feel is appropriate, so you will have space for BSD and Linux Mint. Since you are probably familiar with the Windows tools, use them to shrink your main Windows partition.

Next use the Mint CD and open Gparted, it is in the applications menu. You should see the space you liberated from the Windows partition as unallocated. Make the entire unallocated space into an extended partition. Then make three logical partitions in the extended partition. One for Mint, ext4. One for your swap, swap. And one for BSD, whatever FS you want/need to use for it.

Install your BSD next into the pre-made partition. Be sure to install grub to the correct partition in the installer.

Then install Mint 8 into it's pre-made partition. You will need to use the manual partitioning mode for this. Again, be sure to assign grub to the correct partition on the last installer screen before the actual install. The button is called "advanced" I think.

Now, here is the key. After you have installed Mint and before you reboot, open Gparted again and set the boot flag/active partition to the partition Mint is on.

When you reboot you should get the grub menu where you can select the system you want to boot.

If you wish to go back to Windows only you would boot the Mint cd again, open gparted and change the boot flag back to the Windows partition.

Hope this works out for you. Incidentally, we have "viking777" to thank for getting me started looking into this method. :-)

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Installing GRUB2 on BR instead of MBR

Postby airscorp on Sat Feb 06, 2010 2:20 am

Fred, thank you for the swift reply.

Your take is interesting, provided that the existing MBR just seeks the partition flagged as active and passes control to it. It's fairly logical that it does, but I'm fairly new with MBRs and BRs. That's also the kind of knowledge I'm trying to derive from setting up this multi-boot.
Also, it's nice to read that the partitioning scheme you suggest is almost exactly what I've configured.

However, to clarify my question, and I hope you you don't mind me quoting you :)
Fred wrote:The button is called "advanced" I think.

What I'm actually interested in is how exactly the menu under the "Advanced" button works.

Let's say that my Linux partition will be dev/sda5. So, naturally I'll be selecting this one from the drop-down.
What I'll looking for is GRUB2 writing itself on the boot record of that partition instead of the MBR.
Can you confirm that this is actually what happens? A little down-and-dirty info on the insides of this particular screen in the installer would help too.


PS: Maybe what I ask is a given, but resetting an MBR that my locked BIOS doesn't like requires me to take the HDD out of the laptop since it locks up everything and that's not something I'm looking forward to doing.. AGAIN ;) So, any level of insight would help me.

Oh, and the name's Nick. Thank you once again.
User avatar
airscorp
Level 1
Level 1
 
Posts: 10
Joined: Sat Feb 06, 2010 12:28 am
Location: Patras, Greece

Re: Installing GRUB2 on BR instead of MBR

Postby airscorp on Sat Feb 06, 2010 2:33 am

And one more thing. To do what you suggested
Fred wrote:Then make three logical partitions in the extended partition. One for Mint, ext4.....
...Be sure to install grub to the correct partition in the installer.
...set the boot flag/active partition to the partition Mint is on.

would mean to set a logical partition as active. Is that even possible, or am I missing something?
I thought that the active flag could only be set on primary partitions.
User avatar
airscorp
Level 1
Level 1
 
Posts: 10
Joined: Sat Feb 06, 2010 12:28 am
Location: Patras, Greece

Re: Installing GRUB2 on BR instead of MBR

Postby Fred on Sat Feb 06, 2010 4:49 am

airscorp wrote:
What I'm actually interested in is how exactly the menu under the "Advanced" button works.

When you press the "advanced" button it will display "mbr" or "sda" which is the default. Click in the window and backspace it out and type "sda5" and hit enter.

I thought that the active flag could only be set on primary partitions.

No, you can set the boot flag to a logical partition. Hope that helps.

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: Installing GRUB2 on BR instead of MBR

Postby airscorp on Sat Feb 06, 2010 10:39 am

Fred wrote:No, you can set the boot flag to a logical partition. Hope that helps.

Yes, that is actually pretty cool and simplifies things tremendously.

Thanks for the help and give kudos to viking777 for the method :)

Nick
User avatar
airscorp
Level 1
Level 1
 
Posts: 10
Joined: Sat Feb 06, 2010 12:28 am
Location: Patras, Greece

Re: [SOLVED] Installing GRUB2 on BR instead of MBR

Postby airscorp on Wed Feb 10, 2010 8:43 am

I'm changing the thread's status to solved. I have now a nicely working triple-boot system.

Some notes to Fred since I think he'll be interested on some feedback on his method:

Fred, I couldn't make make your method work on the logical partition. Of course, GRUB2 itself warns against installing on PBRs in general, but my testing showed that it does work on primary partitions. There's also mention on other forums that grub-install of 1.97beta4 that I guess Ubiquity utilizes has a bug installing on mounted logical partitions, but I couldn't find the actual filed bug.

You'd be happy to know that after all my woes, I just flashed my BIOS and it's now happy with GRUB2 on the MBR, which made my whole question irrelevant. I'm now a happy triple-booter.
User avatar
airscorp
Level 1
Level 1
 
Posts: 10
Joined: Sat Feb 06, 2010 12:28 am
Location: Patras, Greece

Re: [SOLVED] Installing GRUB2 on BR instead of MBR

Postby Fred on Wed Feb 10, 2010 1:44 pm

airscorp,

Thanks for the feed back. The bug you mentioned must not be universal to all hardware. I currently have Grub2 installed on three logical partitions working just fine. I have noted that it is slower than legacy grub however.

In any case I am happy you got it going to your satisfaction. :-)

Thanks

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: MSN [Bot] and 18 guests