[CentOS] What happened if install a el7 package on a el6 system

Wed May 8 11:28:18 UTC 2019
Stephen John Smoogen <smooge at gmail.com>

On Wed, 8 May 2019 at 07:08, Peter <peter at pajamian.dhs.org> wrote:

> On 8/05/19 12:22 AM, Robert Heller wrote:
>

The >> are from me.


> >> Many CentOS-7 packages will not install because they will need
> dependencies
> >> that the EL-6 does not have.
>
> Correct, and different versions of dependencies, and files go in
> different locations, etc.
>
> >> The kernel is different because it is mostly
> >> self-contained and meant to be parallel installed.
>
> Correct.
>
> > In most cases, it should
> >> result in an unbootable system because the boot is going to be
> >> dracut+systemd bits and the EL-6 has none of that.
>
> Older versions of dracut will run on newer kernels just fine.  When you
> install the kernel on CentOS 6 it will run the CentOS 6 version of
> dracut at the time of the install and create a CentOS 6 compatible
> initramfs image.
>
>
I wasn't sure if this would work, but since the person has a working system
and you have explained why.. I learned something new. Thank you.



> Systemd is user-space and does not include components in the kernel (as
> far as I'm aware).  Even if it does, the kernel is still
> backwards-compatible and would boot just fine to upstart (which is the
> init system in CentOS 6), it simply would not use those modules and
> features that are used for systemd.
>
> > And I wonder if the EL7 kernel will even show up as an available
> kernel.  EL7
> > uses Grub 2 and EL6 uses Grub [1].
>
> CentOS 7 does have grub legacy (1) as an option and does work fine with
> grub legacy.  I have set up CentOS 7 systems that use grub legacy in the
> past.  It stands to reason that a kernel that installs and configures
> just fine in grub legacy on CentOS 7 will do the same in grub on CentOS 6.
>
> > I know that when I installed Ubuntu 18.04 as a *second* OS, that even
> though
> > the /boot file system is shared between CentOS 6 and Ubuntu 18.04 the
> Ubuntu
> > 18.04 installer did not touch /boot/grub/grub.conf and installed
> > /boot/grub/grub.cfg along side (I manually reinstalled grub 1 and
> manually
> > hacked /boot/grub/grub.conf to put the Ubuntu 18.04 boot option in).
>
> This is not the case with CentOS.  You can run dual-boot CentOS 6 and 7
> on the same grub legacy boot loader and CentOS 7 will boot up and run
> just fine.
>
> While I cannot make any guarantees that a CentOS 7 kernel will not cause
> issues running in CentOS 6, and indeed I would not support a system that
> used such, the Linux kernel, being self-contained and largely
> backwards-compatible should in theory, at least, not have issues running
> a CentOS 7 kernel on CentOS 6, and indeed there are newer kernels that
> are specifically built for CentOS 6 (elrepo kernel-ml) that run just
> fine as well.
>
> The main thing that might stand in your way would be any changes to the
> rpm file format (which does happen from time to time) that prevent an
> rpm built for CentOS 7 from being recognized and installible by rpm or
> yum in older versions of CentOS 6.  I am aware of such changes from
> older versions of CentOS but none between CentOS 6 and 7.
>
> So in summary, it would probably work just fine, but I wouldn't do it,
> recommend it or support it.
>
>
> Peter
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
>


-- 
Stephen J Smoogen.