Robert Heller
2019-May-07 12:22 UTC
[CentOS] What happened if install a el7 package on a el6 system
At Tue, 7 May 2019 05:50:35 -0400 CentOS mailing list <centos at centos.org> wrote:> > On Tue, 7 May 2019 at 04:06, wuzhouhui <wuzhouhui14 at mails.ucas.ac.cn> wrote: > > > Hi, > > > > Recently, I encountered a interesting phenomenon that CentOS 6.3 > > running as normal even if I (my colleague, actually) installed a > > kernel that build for CentOS 7.x (e.g. kernel-3.10.0-327.el7.x86_64.rpm). > > > > I found kernel is mismatch accidentally when I using "uname -r" to > > check kernel version. So my question is what the harmness we will > > get if I install a el7 rpm into a el6 system? > > > > > Many CentOS-7 packages will not install because they will need dependencies > that the EL-6 does not have. The kernel is different because it is mostly > self-contained and meant to be parallel installed. 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.And I wonder if the EL7 kernel will even show up as an available kernel. EL7 uses Grub 2 and EL6 uses Grub [1]. *Different* config files. Because (unlike Lilo), grub is not updated in the MBR each time its config is updated (eg installing a new kernel), it is very likely the EL7 kernel rpm install might not touch /boot/grub/grub.conf, since it is expecting to update /boot/grub/grub.cfg instead. 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).> > > > > > Thanks. > > _______________________________________________ > > CentOS mailing list > > CentOS at centos.org > > https://lists.centos.org/mailman/listinfo/centos > > > >-- Robert Heller -- 978-544-6933 Deepwoods Software -- Custom Software Services http://www.deepsoft.com/ -- Linux Administration Services heller at deepsoft.com -- Webhosting Services
Peter
2019-May-08 11:08 UTC
[CentOS] What happened if install a el7 package on a el6 system
On 8/05/19 12:22 AM, Robert Heller wrote:>> 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. 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
Stephen John Smoogen
2019-May-08 11:28 UTC
[CentOS] What happened if install a el7 package on a el6 system
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.
Seemingly Similar Threads
- What happened if install a el7 package on a el6 system
- What happened if install a el7 package on a el6 system
- What happened if install a el7 package on a el6 system
- What happened if install a el7 package on a el6 system
- (EXT) CentOS Digest, Vol 162, Issue 29