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?
Thanks.
On Tue, 7 May 2019 at 04:06, wuzhouhui wuzhouhui14@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.
Thanks. _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
At Tue, 7 May 2019 05:50:35 -0400 CentOS mailing list centos@centos.org wrote:
On Tue, 7 May 2019 at 04:06, wuzhouhui wuzhouhui14@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@centos.org https://lists.centos.org/mailman/listinfo/centos
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
On Wed, 8 May 2019 at 07:08, Peter peter@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@centos.org https://lists.centos.org/mailman/listinfo/centos
On 2019-05-07 04:50, Stephen John Smoogen wrote:
On Tue, 7 May 2019 at 04:06, wuzhouhui wuzhouhui14@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.
+1
One needs to rebuild (recompile) everything that was not built on "mismatched" version of the system. And this will constitute correct "installation using old UNIX way". Otherwise you quite likely will have problems (even if they are hidden, i.e. if it appears to you that "all works"). One of examples would be using some library that is of different version than your extra software was compiled against. The library might be found, and successfully loaded at an execution time, but it may have different subroutine entry names or some missing which may be discovered only under some circumstances. At a compilation time the headers will be what provides necessary information... Anyway, understanding this will tell you apart as a sysadmin from "non-sysadmin" person ;-)
Valeri
Thanks. _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Valeri Galtsev wrote:
On 2019-05-07 04:50, Stephen John Smoogen wrote:
On Tue, 7 May 2019 at 04:06, wuzhouhui wuzhouhui14@mails.ucas.ac.cn wrote:
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.
+1 One needs to rebuild (recompile) everything that was not built on "mismatched" version of the system. And this will constitute correct "installation using old UNIX way". Otherwise you quite likely will have problems (even if they are hidden, i.e. if it appears to you that "all works"). One of examples would be using some library that is of different version than your extra software was compiled against. The library might be found, and successfully loaded at an execution time, but it may have different subroutine entry names or some missing which may be discovered only under some circumstances. At a compilation time the headers will be what provides necessary information... Anyway, understanding this will tell you apart as a sysadmin from "non-sysadmin" person ;-)
Yup, Valeri's absolutely correct. I *have* rebuilt drivers (Rocket Raid, for example, doesn't appear to maintain drivers for cards over about 4 yr old). The biggest problem in mismatches is that someone's changed a variable name, for whatever reason, and you get "unknown variable".
mark
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?
I would say it depends on the dependencies. If its just some userspace tooling then it will probably work ok. Its just x86_64 binaries after all. When you start getting into drivers and system level libraries then your probably gonna have a bad time but even then, the kernel doesn't change that much. Most of the new kernel stuff is for obscure virtualisation / containerisation techniques.
Of course daemons will be a difficult area as the SystemD stuff might not there but it seems that there is still a lot of packages that ship with init.d scripts.
I generally found el6 packages to be generally compatable with el7 and vice versa but there is no guarantee that the next update wont horribly break your system. In fact, it probably will :)
Security was often a second concern to ' this system will horribly break if we update it so lets just turn off the internet!'
Reproduce steps:
1. Prepare a CentOS 6.3 system on a VM (make sure grubby-7.0.15-3.el6.x86_64 has been installed) 2. Download kernel-3.10.0-327.el7.x86_64.rpm from http://vault.centos.org/ 3. 3.1 Create a symlink with "ln -s /sbin/new-kernel-pkg /usr/sbin/new-kernel-pkg" 3.2 Install kernel-3.10.0-327.el7.x86_64.rpm with "rpm -i --force --nodeps" 4. Reboot
Then we'll see the system boot and running as normal. And /etc/grub.conf updated automatically.
-----Original Messages----- From: wuzhouhui wuzhouhui14@mails.ucas.ac.cn Sent Time: 2019-05-07 16:05:54 (Tuesday) To: centos@centos.org Cc: Subject: [CentOS] What happened if install a el7 package on a el6 system
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?
Thanks. _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos