LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 07-15-2015, 07:32 PM   #1
nix84
Member
 
Registered: Apr 2014
Posts: 276

Rep: Reputation: Disabled
multiple OSs and GRUB2


Preparing to install several distros on my external USB drive. Curious about GRUB2.
Should I install each OS in reverse order of likely use in order for successive GRUB2's to capture the existence of prior installs? Or is that even how it works?
 
Old 07-16-2015, 02:22 AM   #2
Head_on_a_Stick
Senior Member
 
Registered: Dec 2014
Location: London, England
Distribution: Debian stable (and OpenBSD-current)
Posts: 1,187

Rep: Reputation: 285Reputation: 285Reputation: 285
I recommend that you make sure that the installer does *not* install a bootloader and then reboot into the original distribution afterwards and run:
Code:
# update-grub
To generate a menu entry for the new distribution.

The key is that the last distribution to install GRUB "controls" the bootloader -- ie, the configuration file in that distribution is the file that is parsed by the bootloader.
 
1 members found this post helpful.
Old 07-16-2015, 03:02 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
update-grub is a Debian-ism - not available in all distros.

Having once had the installer (Anaconda as it happens) refuse to install a kernel if you chose to not install the boot-loader, I am a little gun-shy of this now. I allow all systems to install a loader, but install the "favourite" system last - and boot into it to run mkconfig when the need arises.
As is usual in this namespace, more than one way to do it.
 
2 members found this post helpful.
Old 07-16-2015, 06:12 AM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Just a few days ago, I installed Ubuntu 14.04 on a system that had Centos 7.1. The Centos boot menus where totally messed up as a result - what was labeled "rescue" was the normal kernel and vice versa, and they ended up with the wrong root device.

I would create the final grub config file manually, or keep copies of the intermediate grub config files as you progress with you installs. As a minimum, check everything when you are done.

Changing the order of the menuentry clauses shouldn't be a big deal.
 
1 members found this post helpful.
Old 07-17-2015, 01:12 AM   #5
nix84
Member
 
Registered: Apr 2014
Posts: 276

Original Poster
Rep: Reputation: Disabled
Thanks to all -- BIG help!
 
Old 07-17-2015, 07:25 AM   #6
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
Here's my recipe for dealing with the situation:
Code:
 Install 1st distro with separate boot partition mounted at /boot and grub2 in MBR
 Unmount /boot, remount in /mnt/Boot
 Copy everything in /mnt/Boot to /boot
 Install grub in 1st OS's boot sector
 Manually modify grub.cfg in boot partition to chainload 1st OS's bootloader
 While additional OSs remain to be installed:
  Install next distro in new partition (with grub in this partitions boot sector)
  Manually modify grub.cfg in boot partition to chainload this OS's bootloader

Last edited by RockDoctor; 07-17-2015 at 07:26 AM. Reason: formatting
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub2 Chainloading / Multiple Distros GloW_on_dub Linux - Software 5 12-04-2012 05:29 AM
Grub2 shows multiple entries for each of my quad-boot OS's. Bhakta Neal Linux - Newbie 2 11-19-2010 06:52 AM
grub2 - multiple OSes milomak Linux - General 7 06-17-2009 07:51 PM
boot multiple OSs DonaldUK Mandriva 7 06-15-2004 03:52 PM
OSS Emulation and multiple Channels taurin Linux - Hardware 0 04-29-2004 02:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 09:44 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration