LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 12-08-2011, 07:25 PM   #1
Bernt.Ribbum
LQ Newbie
 
Registered: Aug 2011
Location: Oslo, Norway
Distribution: Ubuntu
Posts: 15

Rep: Reputation: Disabled
Triple-boot Linux distros - how and where to install GRUB2?


This is my Scenario!

Live CD Ubuntu 11.04
Live CD Mint 11.10
Live CD SuSE Gnome 11.4

I would like to have each of them boot from a partition on my HD, easily configurable. I boot all distros OK now, but configuration is a pain. For example, If I type "sudo grub-install /dev/sda" from Mint all is OK, but I thought an "update-grub" should do it. I just don't know enough. So, pretty easy questions for those who do:

* When I install from a live CD, where should I place the boot loader in each case? In my case, I've always said "/dev/sda", and it works but is troublesome.

* If I install each boot loader to the actual partition I'm installing the distro to, there should be (afaik) one "main" boot loader at /dev/sda, and chainloading to the others!?! How does this work, and how can I install that?

Thanks for any help!

- Bernt
 
Old 12-08-2011, 08:32 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,271

Rep: Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028Reputation: 1028
I prefer to have one system with a separate /boot partition and that "owns" the MBR. All other systems are installed into their respective root partition. Generally an update-grub will find all the other kernels and build a boot menu o.k for you - just re-run it (on the MBR "owning" system) after each new install. No need to chainload.
Note that update-grub is a "Debian-ism" and wasn't shipped as standard in (classic) grub. The devs for grub2 included much of their Debian heritage.

Update-grub rebuilds grub.cfg, not the boot code.
 
Old 12-09-2011, 05:55 AM   #3
Knightron
Senior Member
 
Registered: Jan 2011
Location: Planet Earth
Distribution: Slackware.
Posts: 1,325
Blog Entries: 7

Rep: Reputation: 157Reputation: 157
Hey mate, i personally have a grub legacy partition which is installed at sda1, which chainloads each of my distos which have there bootloaders at there root. This setup is perfect for me, but may be complicated for fresh noob (for the record i still classify my self as a noob but maybe not as quite as fresh as you). I would think that installing to the mbr which would be /dev/sda would be fine for your setup. You say you have issues with this. Mind me asking what the issues are? you may just not be dealing with it right.
 
Old 12-09-2011, 10:02 AM   #4
Bernt.Ribbum
LQ Newbie
 
Registered: Aug 2011
Location: Oslo, Norway
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Knightron View Post
Hey mate, i personally have a grub legacy partition which is installed at sda1, which chainloads each of my distos which have there bootloaders at there root. This setup is perfect for me, but may be complicated for fresh noob (for the record i still classify my self as a noob but maybe not as quite as fresh as you). I would think that installing to the mbr which would be /dev/sda would be fine for your setup. You say you have issues with this. Mind me asking what the issues are? you may just not be dealing with it right.
Knightron,
I do consider myself a NOOB, but I have used Linux for many years already. Unfortunately I've been in a rather serious accident, so I forget things quickly. But I want to have my machines running a wonderful operating system! The problem I have is that update-grub does not automatically add new kernels to the boot menu, but grub-install does. syg00 also gave advise - I'll try and see what I get.

Thanks for the reply - I'm right now running a fresh Mint install that was installed without touching the MBR, and it works. I had to redo "grub-install" in my "MBR-owner" to get to Mint though. What happens when I install even more distros I'll just have to see though. But I'll get there!

- Bernt

LinuxCounter registered user #93216.
Lenovo Thinkpad T500, HP Mini 110
Ubuntu 11.04, Mint 11, SuSE Gnome 11.4

Last edited by Bernt.Ribbum; 12-09-2011 at 04:15 PM.
 
Old 12-09-2011, 02:22 PM   #5
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
I have a separate boot partition and chainload my distros. I do not update my kernels, I clean partition and do new installs for all upgrades. I use grub2 and direct grub to install to the root on all my distros. This still should work for you by doing an update-grub on the distro. This way I do not have to change my menuentry for each upgrade. My menuentry reads "Suse" or "Ubuntu" and so forth. I do indicate the partition in the menu at the end of the name to make it easier to remember the partition numbers.

I will advise first planning out and making all your partitions first, that way there will be less of a chance of uuid and mapping problems.

Last edited by Larry Webb; 12-09-2011 at 02:24 PM.
 
Old 12-09-2011, 05:18 PM   #6
Knightron
Senior Member
 
Registered: Jan 2011
Location: Planet Earth
Distribution: Slackware.
Posts: 1,325
Blog Entries: 7

Rep: Reputation: 157Reputation: 157
Ubuntu, Mint, Suse. These are the three distros you use. I'm pretty sure all three of these use grub2, but i may be wrong with suse. If it doesn't use grub2, and uses grub legacy then the command 'update grub' won't work.
This setup you may not like and there are alternatives, but it's probably the easiest. do a reinstall of each, the first distro you install, install it to mbr, then with any other distro you install after that, install to it's /. If you choose to use this method, on boot you will see two grub menus, first you'll see the mbr grub, then you'll select the distro, then it's grub will boot and you may choose any kernel you've loaded, (assuming you've updated grub on that partition). You will have to go into the first distro and 'update grub' to see the new kernels at the first menu. This post probably doesn't do this setup much justice, but i used to do this, with lilo at the mbr and it was very easy to manage and not as complicated as this post may make it sound.
 
Old 12-09-2011, 06:06 PM   #7
Bernt.Ribbum
LQ Newbie
 
Registered: Aug 2011
Location: Oslo, Norway
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Knightron View Post
Ubuntu, Mint, Suse. These are the three distros you use. I'm pretty sure all three of these use grub2, but i may be wrong with suse. If it doesn't use grub2, and uses grub legacy then the command 'update grub' won't work.
This setup you may not like and there are alternatives, but it's probably the easiest. do a reinstall of each, the first distro you install, install it to mbr, then with any other distro you install after that, install to it's /. If you choose to use this method, on boot you will see two grub menus, first you'll see the mbr grub, then you'll select the distro, then it's grub will boot and you may choose any kernel you've loaded, (assuming you've updated grub on that partition). You will have to go into the first distro and 'update grub' to see the new kernels at the first menu. This post probably doesn't do this setup much justice, but i used to do this, with lilo at the mbr and it was very easy to manage and not as complicated as this post may make it sound.
Thanks for a great reply! My own thoughts are very much alike, as follows:

I have been thinking a bit myself... First I wondered what happened during the boot process in the first place, thought about the partition's "boot" flag and such things. It turns out this is a hangover from DOS/Windows and is not used at all with lilo/grub/grub2. Then I read about where the boot code is actually located, and found it could in fact be several places. First, the "MBR" may have a number of sectors free BEFORE the first actual partition, and use this space for the boot code. Second, every partition is "free" to host its own boot code, but may be tampered by e.g. aggressive fsck reordering. This last item I have decided to ignore, and rely on my partitioning to leave some room prior to /dev/sda1. So my plan is as follows, and I hope it will work:

(1) Install Mint: repartition the disk completely, leaving some MiBs free before /dev/sda1; install boot to /dev/sda
(2) Install Ubuntu: make a partition for it, and install its boot loader there (/dev/sda2)
(3) Install SuSE: repetition (/dev/sda3)

This should leave me with a system that uses Mints boot code first, letting me choose OS from there, and if I choose one of the other distros, their boot code will believe the OS is alone, therefore presenting no new menu at all!

Wish me luck

- Bernt
 
Old 12-09-2011, 06:21 PM   #8
Knightron
Senior Member
 
Registered: Jan 2011
Location: Planet Earth
Distribution: Slackware.
Posts: 1,325
Blog Entries: 7

Rep: Reputation: 157Reputation: 157
OK great, let us know how it turns out. That's chainloading by the way. Lastly, for the record, i recently tried out opensuse 12.1, but no longer have it on my system. As stated before, i have a grub legacy partition on my system which boots up and then chainloads to each of my distros. When i installed Opensuse 12.1 on my computer, it's grub to it's /, i thought it'd be fine, but it wasn't. The way my grub partition works is, when the computer boots up, the mbr consults the boot partition at /dev/sda(x) so it knows what to boot. When i installed opensuse, and this is the only distro i've had do this, it overwrote where the mbr should consult and told the mbr to consult the opensuse partition instead. It was a simple fix once i realized what the hell had gone on, but i found it intrusive, and you may encounter similar issues once you install opensuse.
 
Old 12-09-2011, 06:32 PM   #9
Bernt.Ribbum
LQ Newbie
 
Registered: Aug 2011
Location: Oslo, Norway
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Knightron View Post
OK great, let us know how it turns out. That's chainloading by the way. Lastly, for the record, i recently tried out opensuse 12.1, but no longer have it on my system. As stated before, i have a grub legacy partition on my system which boots up and then chainloads to each of my distros. When i installed Opensuse 12.1 on my computer, it's grub to it's /, i thought it'd be fine, but it wasn't. The way my grub partition works is, when the computer boots up, the mbr consults the boot partition at /dev/sda(x) so it knows what to boot. When i installed opensuse, and this is the only distro i've had do this, it overwrote where the mbr should consult and told the mbr to consult the opensuse partition instead. It was a simple fix once i realized what the hell had gone on, but i found it intrusive, and you may encounter similar issues once you install opensuse.
Thank you for the warning! I installed OpenSuSE 11 on my current system and had no particular problems with it, therefore I planned as stated above. I'll let you know after a good night's sleep

- Bernt
 
Old 12-10-2011, 11:26 AM   #10
Bernt.Ribbum
LQ Newbie
 
Registered: Aug 2011
Location: Oslo, Norway
Distribution: Ubuntu
Posts: 15

Original Poster
Rep: Reputation: Disabled
I promised to post an update - here it is: I have decided to leave my system alone! After all, it boots perfectly well now, and I have my three Linux distros working very well indeed. If I decide to go for something more, I will probably be back, but for now I'm happy with what I have learned so far. Luckily I don't use any proprietary software that will destroy my system for no reason. So: happy now

- Bernt
 
Old 12-10-2011, 01:05 PM   #11
chip66
LQ Newbie
 
Registered: Mar 2011
Posts: 6

Rep: Reputation: 0
Hey,
Here's a suggestion for the grub people: since grub goes out to other partitions and looks for kernels to boot, how about looking for other grub installations and offering to unify them?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux distros install but then don't complete boot tandlj Linux - Newbie 6 11-16-2011 05:02 AM
[SOLVED] GRUB2 after a minor update of GRUB2 /boot prefix no longer needed?? wikapuki Linux - Software 1 10-24-2010 02:39 PM
GRUB2 - FreeBSD-8.0 does not show up in triple boot menu, dual boot menu it does.. wiliweld *BSD 7 05-03-2010 01:05 PM
Modifying distros iso images to boot with grub2 NightHorse Linux - Distributions 3 10-12-2009 06:46 PM
Triple Booting 2 Linux Distros and Windows kwosource Linux - Newbie 5 03-03-2005 12:16 PM


All times are GMT -5. The time now is 08:52 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration