You are not logged in.

#1 2017-04-14 19:48

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

[SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

Hello smile

I have been very pleased to find a distribution that is using Trinity as the default desktop, so I've been experimenting with it. I'm sure I will have some other questions later but right now I noticed something I need to solve.

I noticed that when installing I have no option of where to place GRUB. I assume therefore it gets written to the MBR of the hard disk, which is a problem because I use a third-party bootloader program to manage my OS installations (read keep different versions of Windows from molesting each other).

I need GRUB to be written to the root partition so that I can "chainload" to it with my other bootloader. As it is if I re-enable my other bootloader (which will overwrite the current MBR) I assume this will destroy Q4OS's GRUB and I will lose access to my new Q4OS installation.

Is there a command I can run that will produce the default GRUB settings but written to the root partition PBR rather than the MBR?
Thanks!

Last edited by LoneCrusader (2017-04-15 03:47)

Offline

#2 2017-04-14 20:41

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: [SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

I'm not 100% sure on this but can't you just select to install grub to /dev/sda3 (or whatever partition has q4os) and then your other boot loader should see it and be able to boot correctly without anything being overwritten. I recall installing like that a long time ago and then I used the bios boot selector to select the partition to boot from. Like I said it has been a long time since I needed to do anything like this, so maybe it has changed...

Last edited by Dai_trying (2017-04-14 20:41)

Offline

#3 2017-04-14 20:47

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

Dai_trying wrote:

I'm not 100% sure on this but can't you just select to install grub to /dev/sda3 (or whatever partition has q4os) and then your other boot loader should see it and be able to boot correctly without anything being overwritten. I recall installing like that a long time ago and then I used the bios boot selector to select the partition to boot from. Like I said it has been a long time since I needed to do anything like this, so maybe it has changed...

Yes, that's how it should work and that's what I need to be able to do during installation but I didn't have the option. So now I need to do that manually. smile

Offline

#4 2017-04-14 20:56

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: [SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

I only install from the live-cd's and the option is still there.

If you can enter your Q4OS system you can install grub to any available partition with

sudo grub-install /dev/sda3

obviously you should place you partition reference in place of "sda3" in that command.

If you cannot get into your installed system you can still get grub installed but a slightly more lengthy process which will require using a live-cd to boot from and then chrooting into the installed system to install grub, If you need to do it this way let me know and I will post info for you.

Can I ask what boot loader you are using?

Offline

#5 2017-04-14 21:44

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

Dai_trying wrote:

I only install from the live-cd's and the option is still there.

If you can enter your Q4OS system you can install grub to any available partition with

sudo grub-install /dev/sda3

obviously you should place you partition reference in place of "sda3" in that command.

If you cannot get into your installed system you can still get grub installed but a slightly more lengthy process which will require using a live-cd to boot from and then chrooting into the installed system to install grub, If you need to do it this way let me know and I will post info for you.

Can I ask what boot loader you are using?

Well, I ran the command you gave and it seemed to work, although I noticed that I didn't get "two instances" of GRUB during boot after I restarted the machine (sounds crazy I know, but I would have expected this since it should now exist both in the MBR and again on the root partition???). So I proceeded to restore the MBR for my bootloader and now I can't get it to chainload to GRUB on the Q4OS partition.

This could very well be the fault of my bootloader itself (System Commander 8); it's old and has several quirks and limitations of its own but it keeps Windows versions in-line. Or it could be the particular partitioning scheme I used on this disk (3 primary Windows partitions already existed so I have a fourth Extended partition with two Logical partitions inside for Q4OS; one is the root partition and the other is swap). I have used both this bootloader and this particular partitioning scheme before with a different Linux distro however so I'm not sure why it would work then and not now.

Luckily I had just began experimenting and starting over is no real loss. I may need to try installing from the Live CD to begin with and see if having the necessary GRUB option changes anything... Is there any difference between the Live CD installer and the normal CD installer?

Any other ideas welcome as well...

Offline

#6 2017-04-14 22:07

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: [SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

I use the live-cd for installs as it is more customizable during install time (IMO)

I just had a quick look at some info on your boot-loader and from what I have read it has a "wizard" to detect added OS's, but obviously I have never used it so I can't really say for sure.

bm software wrote:

OS Wizard™ - The easiest way to prepare your system for a new operating system
System Commander 8's (SC8) OS Wizard makes it easier than ever to prepare your computer for your new operating system (OS). Simply choose the OS you plan to install, and the OS Wizard will set up your system, automatically! Or, if you prefer a more hands on approach, you can override the OS Wizard's recommendations. It even includes our exclusive boot-time partitioning.

Also I'm not sure you actually need to install grub as System Commander does what grub would normally do (I think), unless it would normally just point to the different boot-loaders (grub/lilo/etc) available for other installations.

Offline

#7 2017-04-15 03:47

LoneCrusader
Member
Registered: 2017-04-14
Posts: 30

Re: [SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

Dai_trying wrote:

I use the live-cd for installs as it is more customizable during install time (IMO)

Seems to be the case. Installing from the Live CD provided the option I needed and also works as expected with my bootloader.

Dai_trying wrote:

I just had a quick look at some info on your boot-loader and from what I have read it has a "wizard" to detect added OS's, but obviously I have never used it so I can't really say for sure.

Also I'm not sure you actually need to install grub as System Commander does what grub would normally do (I think), unless it would normally just point to the different boot-loaders (grub/lilo/etc) available for other installations.

System Commander isn't quite as robust or exciting as the advertisements made it, lol. I never use the "wizard" functions as I've always been suspicious of "automagic" partitioning tools but it does make a nice graphical bootloader. It handles Windows situations pretty well but I'm not sure if it can load Linux without a Linux bootloader or not.

But in any case the issue is solved. Might be a good idea to add the GRUB install location option to the main install media in the future though. smile

Offline

#8 2017-04-15 07:57

Dai_trying
Member
From: UK
Registered: 2015-12-14
Posts: 2,989

Re: [SOLVED] Multiboot system; need to place GRUB in PBR rather than MBR

I'm glad you got it solved, I think the option is there in the installation iso, but going from memory it wasn't where I expected it to show or it was placed in a way that I overlooked it, I might fire up a VM later to check this as I've not used that iso for a looong time smile

Offline

Board footer

Powered by FluxBB