CentOS, Fedora & RedHat in 1 box

Hi Linux gurus,

My boss had asked me to setup a box consisting of this 3 OS (CentOS, Fedora, RedHat) for autopatching. So, whenever there is new patches for CentOS from the internet, this box will grab it, implement it, if tested ok and approved, the patches will then be push to Production CentOS boxes. The same goes for Fedora & RedHat.

My question would be:

  1. Is this possible for 3 Linux to be put in 1 box?
  2. How the partitioning would be like?
  3. Is there a link where i can read thru for this kind of setup?
  4. Will all the OS be running simultaneously or one at a time?

Thank you in advance

~RaYbAkH~

Yes, I don't see why not. As for how the partitions would be laid out, that depends on...how you want your partitions laid out.

The bare minimum, as I see it:

  • /dev/hda1 -- 200mb of ext2 to hold kernels and grub settings.
  • /dev/hda2 -- 512mb, swap space. They can all use the same swap.
  • /dev/hda3 -- A couple gigs of ext3 for common space. Mount it on something like /opt/shared for all three distros, so you can dump a file there in one distro, reboot into another distro, and still have that file.
  • /dev/hda4 -- All remaining space, as an extended partition.
  • /dev/hda5 -- First partition in extended partition. Holds root partition for Distro #1.
  • /dev/hda6 -- Second partition in extended partition. Holds root partition for Distro #2.
  • /dev/hda7 -- Third partition in extended partition. Holds root partition for Distro #3.

grub.conf for this monster is going to look something like:

title=Centos
kernel (hd0,0)/centos/kernel-2.6.12-r10 root=/dev/hda5

title=Fedora
kernel (hd0,0)/centos/kernel-2.6.12-r10 root=/dev/hda6

title=Redhat
kernel (hd0,0)/centos/kernel-2.6.12-r10 root=/dev/hda7

Even better would be three seperate boot partitions, one for each distro, but that'd mean booting from an extended partition, and I'm not sure how much grub likes that.

Finding a guide for this is unlikely imho, as it'd have to be written by someone who's mastered the same versions of all three distros of interest. You're going to have fun getting all of them to install where you want them.

Of course, if you're going to want multiple boot partitions for each and every distro, things are going to get more complicated.

Thanx Corona688 for the info.

So, i'll be doing this --> CentOS = /dev/hda5
Fedora = /dev/hda6
Redhat = /dev/hda7

Seems like 'fun' in hell. Gonna update u guys as i go along the installation. I wonder if all distro can be up 1 at a time until all 3 are running or 2 down and 1 up? Any advice?

You can only have one Linux running at a time.
You are going to need 3 different boxes to do this.

I have to say, from the getgo, this doesn't sound like a good idea.
Are all your boxes exaclty the same, i.e., same OS version, hardware, running the exact same applications?

I think Corona688 meant that grub.conf would be something like:

title Centos
kernel (hd0,0)/centos/kernel-2.6.12-r10 root=/dev/hda5

title Fedora
kernel (hd0,0)/fedora/kernel-2.6.12-r10 root=/dev/hda6

title Redhat
kernel (hd0,0)/redhat/kernel-2.6.12-r10 root=/dev/hda7

You will need a subdirectory for each distro so that each can have its own kernel. Remember that the extended partition is broken into logical partitions. You can put anything into logical partitions. As long as grub stage1 is installed in the MBR and stage 1.5 is installed in the hidden sectors, stage 2 can be anywhere. I even created a tiny (logical) partition at the very end of a 100 GB and booted from that.

So perderabo,

A collegue of mine have Linux & Windows in his notebook (in which the 60GB are split into 2). He also are able to log into both OS by pressing certain key (in which he is reluctant to teach). Could this be done here; where CentOS, Fedora & Redhat can be access simultaneously.

Nope system shock,
Im gonna try to implement this on 1 box first. if it seems a lot of hassle and time to administer, then i'll propose to my boss to buy another 2 box. (he's trying to cut the cost low and hopefully raise my salary..haha).

So? You can still have 3 distros on one box, they just can't all run at the same time.

He's probably reluctant to teach you, because, you have to shell out a considerable amount of money to get the third-party software that makes this possible -- VMware.

Which, if you're willing to do so, would actually be a pretty good way to simultaneously boot three operating systems. VMware comes in Linux and Windows versions, and does what it says on the box; you can run an entire virtual computer inside it with it's own independent virtual hardware, at nearly native speeds. x86 only of course. I've got VMware Workstation myself, so on the rare occasions I need to boot into Windows, I can, without the risk of giving Windows full control of my computer.

If you don't want that, you'll have to triple-boot, and they won't be simultaneous.

Suppose that CentOS is the default OS, so if the user does not interact with grub, CentOS will boot automaticly. The CentOS startup scripts could fiddle with grub.conf (or use grub's saveddefault concept) so that Redhat is now the default OS. Each OS could arrange for the next OS to be the default in the same way. Now give each OS a cron job that reboots the box, say, every 2 hours. Now the box will cycle through all of the OS's in turn every 2 hours. Maybe that would be good enough.

Sweet,

If this the case, i'll try for the VMWARE software (development purposes) and see how it works. If i've trouble with it, then maybe i'll try the cron job with a cycle of 8 hours a day for each distro. (ample time download, install, push to production servers).

Thankx guys.

~RaYbAkH~

What I was referring to, is that he wants to run the 3 O.S.'s at the same time. Technically, you can use virtualization to do so, however, for the purpose that he wants the servers - testing patches for production- it doesn't seem like a good idea to me.

Sorry man it would be risky to your drive to do all that partitioning back up the drive and yes go to www.linux.org

If your expecting it all to be all inone installation... ...it's not possible. Sorry.

Yup, i know it is risky but possible or not; that is a question that i need to anwer by do the installation first. That is what we are, system admin; to troubleshoot. Hahaha. Whatever the outcome would be, i'll post it here.

~Cheers~ :smiley:

It's not possible to get it all in one installation...

I'm not sure what you mean by "one installation". But you can certainly install all three OS's on a single system. I have a system with XP, Redhat, Fedora, Suse, Debian, and Scientific on it. And I hope to add several versions of BSD and at least one version of Solaris to that.

Yeah I know. I have Windows2000, and mandriva linux.

It's just you would have to do alot of partitionning, and that might requier about 200 GB
for good hard disk space on all of those OS'es

Not true you would not need anything like 200G and three Linux flavors could run in as few as four partitions. I have a triple-boot Ubuntu/XP/Solaris on a 60G disk on my laptop and I have plenty of space in all of them.

Orait..as promised, progress on the installation. I've done it in 2 methods:

  1. As per corona688 suggestion :

/dev/hda1 -- 200mb of ext2 to hold kernels and grub settings.
/dev/hda2 -- 512mb, swap space. They can all use the same swap.
/dev/hda3 -- A couple gigs of ext3 for common space. Mount it on something like /opt/shared for all three distros, so you can dump a file there in one distro, reboot into another distro, and still have that file.
/dev/hda4 -- All remaining space, as an extended partition.
/dev/hda5 -- First partition in extended partition. Holds root partition for RedHat
/dev/hda6 -- Second partition in extended partition. Holds root partition for Fedora
/dev/hda7 -- Third partition in extended partition. Holds root partition for CentOS

1st installation of RedHat is succesful, but when it comes to 2nd installation of Fedora, it fails. It seems that they doesnt support the /, /usr/, /var etc to be cross platform. So, i when for 2 method.

2nd method:

I've separated the 80GB to 3 partition. The 1st installation of RedHat on the first partition with : /, usr, var, tmp, opt, swap, etc. was succesful.

2nd installation of Fedora i did the same spec as per RedHat except, i've left out the swap space and intended to cross platform the swap. So, when i click ok, it requested to format the swap and i proceed. after succes installation it rebooted and i notice that on the grub, the RedHat is gone.

Is there some steps missing here? coz when i redo the RedHat installation it goes vice versa.

Please help me. Thank you in advance.