LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-08-2016, 02:06 PM   #1
mediummatt
LQ Newbie
 
Registered: Sep 2016
Posts: 2

Rep: Reputation: Disabled
Question Stuggling to install multiple distributions on the same pc


Hi,

I wonder if someone could give me some advice please.

I have a pc which I want to install Ubuntu, OpenSUSE & CentOS on as those are the ones that are referenced in an edX course that I am doing (LFS101x - Introduction to Linux). The course gives worked examples in simulations of each but I'd like to be able to delve a little deeper without having to use live DVD's each time.

I seem to be able to manage to install two out of the three but when I installed the third (CentOS) the option to boot into OpenSUSE disappeared from the GRUB loader.

Is there a limit on the number of distributions that can be installed on a single machine?

If not, how do I identify which partition has which distribution on? Foolishly I didn't make a note at the time. My thought was that if I can identify the OpenSUSE partition then I can format that & try to reinstall in the blank space.

Thanks in advance for any help,

Matt
 
Old 09-08-2016, 02:22 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
The easiest way would be to install one, then use that one to host VMs for the others.

Any other way gets into a lot of partitioning hassle, and the ease of screwing up your partition table - deleting one or another, and losing your data (as you saw losing one from grub).

There is no inherent limit (other than the BIOS limit of only 4 partitions) - only how easy it is to make a mistake.

Last edited by jpollard; 09-08-2016 at 02:24 PM.
 
Old 09-08-2016, 02:29 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 6,869

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
Quote:
Is there a limit on the number of distributions that can be installed on
The limit is the size of your hard drive(s). There was a post years ago at another forum (justlinux.com) explaining how the person had installed 140+ different operating systems on one home computer with multiple hard drives.

When you boot one of the systems, run the command: df -h The output will show a column under Mounted on and the one with the root symbol ( / )
will be the one you have booted under the Filesystem column.

If you used the default option with CentOS and installed Grub to the MBR, then you would just need to run the grub2-mkconfig command as explained at the link below.

https://linuxconfig.org/update-grub2...n-rhel-7-linux

The above is only if you are using an MBR boot and may not work with EFI.

some additional info on Grub2 if you are using CentOS.

https://wiki.centos.org/HowTos/Grub2

The post above suggesting virtual software is another option.

Last edited by yancek; 09-08-2016 at 02:32 PM.
 
1 members found this post helpful.
Old 09-08-2016, 02:44 PM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 8 Jessie
Posts: 1,688
Blog Entries: 5

Rep: Reputation: 163Reputation: 163
Quote:
Originally Posted by jpollard View Post
The easiest way would be to install one, then use that one to host VMs for the others.

Any other way gets into a lot of partitioning hassle, and the ease of screwing up your partition table - deleting one or another, and losing your data (as you saw losing one from grub).

There is no inherent limit (other than the BIOS limit of only 4 partitions) - only how easy it is to make a mistake.
Only 4 primary partitions (sda1-sda4). You can make many logical partitions within an extended partition (sda5+). And you can install any major Linux distribution on a logical partition. The practical limit on how many you can install is how much scrolling you're willing to put up with in the boot menu.
 
Old 09-08-2016, 02:49 PM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by IsaacKuo View Post
Only 4 primary partitions (sda1-sda4). You can make many logical partitions within an extended partition (sda5+). And you can install any major Linux distribution on a logical partition. The practical limit on how many you can install is how much scrolling you're willing to put up with in the boot menu.
The problem is only ONE MBR.

Grub no longer supports putting grub in a partition (logical or not). And most BIOS loaders will not load a boot block from a logical partition.

Thus only 4 partitions.

Last edited by jpollard; 09-08-2016 at 02:50 PM.
 
Old 09-08-2016, 02:54 PM   #6
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 8 Jessie
Posts: 1,688
Blog Entries: 5

Rep: Reputation: 163Reputation: 163
Anyway, you can examine the contents of each existing partition to figure out which of the three operating systems is installed. It is NOT always possible to easily figure out which one, if you don't already know which ones are possible. This is because many linux distributions are fundamentally customizations tweaked on top of other major distributions. One a file level, they will look a lot like the parent distribution unless you know just what to look for.

But since you're only possibilities are Ubuntu, OpenSUSE, and CentOS, you can distinguish between them via their differing package management systems.

Ubuntu - apt-get/aptitude package management system. Look for /etc/apt/sources.list. If this file exists, then we're talking a Debian/Ubuntu based distribution.

OpenSUSE - YaST package management system. Look for /var/lib/YaST2 folder. (I think...I'm not an OpenSUSE user.)

CentOS - Yum package managemer. Look for /etc/yum.conf file. (I think...I'm not a CentOS user.)
 
1 members found this post helpful.
Old 09-08-2016, 02:56 PM   #7
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian & Fedora mostly
Posts: 2,022

Rep: Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539Reputation: 539
Quote:
Originally Posted by jpollard View Post
The problem is only ONE MBR.

Grub no longer supports putting grub in a partition (logical or not). And most BIOS loaders will not load a boot block from a logical partition.

Thus only 4 partitions.
Course, if you're using EFI w/ GPT, then you're not limited to 1 MBR (each install gets it's own file on the /boot/efi partition) and you're not limited to 4 primary partitions. And all those distro's have very good support for EFI.

Last edited by Timothy Miller; 09-08-2016 at 02:57 PM.
 
Old 09-08-2016, 03:01 PM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 8 Jessie
Posts: 1,688
Blog Entries: 5

Rep: Reputation: 163Reputation: 163
Quote:
Originally Posted by jpollard View Post
The problem is only ONE MBR.

Grub no longer supports putting grub in a partition (logical or not). And most BIOS loaders will not load a boot block from a logical partition.

Thus only 4 partitions.
You say that as if it were a limitation. First off, I have NEVER run across a BIOS which fails to load a boot block from a logical partition (I use sda5 a lot for reasons that made sense at the time, but which continues to hold over because I tend to clone older installs to save time).

Second, even if you have a BIOS which will only boot to a primary partition, so what? That just means you point the MBR to one of the primary partitions. From there, GRUB2 will conveniently handle the rest of booting to any number of partitions - or even more esoteric things. So long as you remember to NOT install GRUB to the MBR during subsequent installs, it will work fine.

The only "problem" is that the boot menu (maintained by the early install) can get ridiculously tall and require annoying scrolling after you install dozens of OS's.

Last edited by IsaacKuo; 09-08-2016 at 04:21 PM.
 
Old 09-08-2016, 06:35 PM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Haven't ever seen a BIOS that recognized any but the primary partitions.

If you load grub into the MBR, you can tell it (via the distribution originally installed) to look for other installation - but it doesn't mean that it will find them.

You can manually add entries - no problem; but you have to have the original distribution booted to apply the updates.

Besides the "problem" you also have to boot that "early install" to make the changes... The problem that exists is that you can't update the alternate boot - and expect the original to work anymore without being very careful about the menu...

Grub legacy was actually easier. Very simple to add a new entry - and you didn't even have to boot the original install system to do so. AND you could install it in a partition... thus the MBR version just loaded the alternates as a "foreign" os - quite simple, and separated the menus for specific OS versions.

Even Lilo was easier than grub2.
 
Old 09-08-2016, 06:43 PM   #10
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 8 Jessie
Posts: 1,688
Blog Entries: 5

Rep: Reputation: 163Reputation: 163
Quote:
Originally Posted by jpollard View Post
Haven't ever seen a BIOS that recognized any but the primary partitions.
Well then who cares what the BIOS recognizes? Grub2 can boot from the MBR to logical partitions, no problem, regardless of what the BIOS recognizes, evidently. Seriously. I have never had any problem with Grub2 on sda5, and I've installed onto a wide variety of desktop and laptop computers ranging from Pentium II systems to Core i5.

Quote:
If you load grub into the MBR, you can tell it (via the distribution originally installed) to look for other installation - but it doesn't mean that it will find them.

You can manually add entries - no problem; but you have to have the original distribution booted to apply the updates.
First off - for a newbie, booting to the original distribution to apply updates is the easy way and an acceptable price to pay for ease of use.

Second - once you get familiar with manually adding entries to grub2, you can manually add them from another linux install no problem. Just copy over the relevant vmlinuz and initrd files if necessary, and manually copy over the relevant grub.cfg entries to the custom portion of boot/grub/grub.cfg (and also etc/grub.d/40_custom for good measure).

This is, to me, simply NOT A BIG DEAL.

Quote:
Grub legacy was actually easier. Very simple to add a new entry - and you didn't even have to boot the original install system to do so.
Meh, you can do it with grub2 and in my experience it's generally easier and more reliable in grub2 thanks to the use of UUIDs.
 
Old 09-08-2016, 06:45 PM   #11
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

Rep: Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408Reputation: 2408
i run OpenSUSE 42.1 and Scientific Linux 6.7

BOTH os's have there own bootloaders ( different drives )
and both can boot the other ( a back up of a back up )

this dose add complications so be warned

however opensuse's bootloader is rather nice and has a nice GUI
and can be set in yast2 to "check for alien operating systems "

suse's grub2 will find and add a entry for Cent AND Ubuntu

so install suse then cent ( without bootloader
then ubuntu also without the bootloader and have suse look for them
 
1 members found this post helpful.
Old 09-08-2016, 07:08 PM   #12
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,600

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by IsaacKuo View Post
Well then who cares what the BIOS recognizes? Grub2 can boot from the MBR to logical partitions, no problem, regardless of what the BIOS recognizes, evidently. Seriously. I have never had any problem with Grub2 on sda5, and I've installed onto a wide variety of desktop and laptop computers ranging from Pentium II systems to Core i5.


First off - for a newbie, booting to the original distribution to apply updates is the easy way and an acceptable price to pay for ease of use.

Second - once you get familiar with manually adding entries to grub2, you can manually add them from another linux install no problem. Just copy over the relevant vmlinuz and initrd files if necessary, and manually copy over the relevant grub.cfg entries to the custom portion of boot/grub/grub.cfg (and also etc/grub.d/40_custom for good measure).

This is, to me, simply NOT A BIG DEAL.
Personally, I don't think it is all that big deal either.
The problem is that most installation procedures want to wipe out the /boot for their OWN version.
Quote:
Meh, you can do it with grub2 and in my experience it's generally easier and more reliable in grub2 thanks to the use of UUIDs.
Nothing in grub legacy prevents using UUIDs. You even get the benefit of being able to install grub legacy in partitions, which allows you to have multiple /boot partitions if you want to keep each distribution independent of the others.

Last edited by jpollard; 09-08-2016 at 07:09 PM.
 
Old 09-08-2016, 07:20 PM   #13
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 8 Jessie
Posts: 1,688
Blog Entries: 5

Rep: Reputation: 163Reputation: 163
Quote:
Originally Posted by jpollard View Post
Personally, I don't think it is all that big deal either.
The problem is that most installation procedures want to wipe out the /boot for their OWN version.
So don't share /boot, obviously. It's just begging for trouble. I simply let /boot for each install be inside their respective / partitions and copy over whatever files I deem necessary/desirable to the one MBR is pointed to.
Quote:
Nothing in grub legacy prevents using UUIDs. You even get the benefit of being able to install grub legacy in partitions, which allows you to have multiple /boot partitions if you want to keep each distribution independent of the others.
There's nothing preventing you from having multiple /boot partitions with grub2.

Grub legacy in partitions and chain loading is a mess of complications and extra points of failure that are best avoided in favor of putting everything in a single master grub2 /boot (within just one "master" OS).
 
Old 09-08-2016, 07:58 PM   #14
Fred Caro
Member
 
Registered: May 2007
Posts: 999

Rep: Reputation: 166Reputation: 166
All very interesting but does it help "mediummatt"?

mediummatt, if you are using a desktop you could use a second HDD and move the sata/pata leads around or control it from the bios via boot priority. 2 disros on one and 1 on the other.

For Virtualbox you have to be mindful of guestadditions and the corresponding kernels on the different disros.

Fred.
 
1 members found this post helpful.
Old 09-08-2016, 08:52 PM   #15
plasmonics
Member
 
Registered: Jan 2009
Distribution: Fedora, Gentoo
Posts: 125

Rep: Reputation: 46
Quote:
Originally Posted by mediummatt View Post
Hi,
I seem to be able to manage to install two out of the three but when I installed the third (CentOS) the option to boot into OpenSUSE disappeared from the GRUB loader.
You need to identify your hardware, whether it is UEFI with a GPT disk or BIOS with MBR disk. It is easier to get help here if the users understand your setup. Installing three linux distros is no different from installing all of the ones you mentioned. You need to make one of them your primary boot loader. When you install the others, you need to update the grub.cfg file in the primary so that all of the others show up in the grub menu.
Quote:
Is there a limit on the number of distributions that can be installed on a single machine?
If the motherboard is legacy BIOS and the hard drive MBR labelled, you can install up to 15 linux distros.

If the motherboard is UEFI and the hard drive GPT labelled, you can install up to 128 linux distros. You can increase this number by increasing the size allocated for the GPT table.
 
1 members found this post helpful.
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install multiple Linux Distributions on a USB stick RohitBhosale Linux - General 2 06-24-2009 12:08 PM
LXer: Setting Up A PXE Install Server For Multiple Linux Distributions On Debian Lenn LXer Syndicated Linux News 0 05-26-2009 12:20 PM
ANNOYING FREEZES: Happens on multiple distributions on multiple computers. keithieopia Linux - Software 26 02-23-2009 03:36 PM
How to install multiple linux distributions on a computer orpolo Linux - General 17 12-25-2006 01:07 AM
LXer: Setting Up A PXE Install Server For Multiple Linux Distributions With Ubuntu Edgy Eft LXer Syndicated Linux News 0 12-20-2006 01:54 AM


All times are GMT -5. The time now is 10:05 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration