0

I'm trying to configure 2 yum repository (RHEL 7.0 and RHEL 7.2) in my server. I'm done creating their .repo files. See output below:

[root@foundation ~]# yum repolist all
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id                                                 repo name                                                                         status
InstallMedia                                            Red Hat Enterprise Linux 7.2                                                      disabled
google-chrome                                           google-chrome                                                                     enabled:     3
rhel_7_0                                                RHEL 7.0 repository (foundation server)                                           enabled: 4,305
rhel_7_2                                                RHEL 7.2 repository (foundation server)                                           enabled: 4,620
repolist: 8,928
[root@foundation ~]# 

When I try to list the kernel packages, it only shows the package available in RHEL 7.2

[root@foundation ~]# yum list *kernel*
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
abrt-addon-kerneloops.x86_64                                         2.1.11-34.el7                                                      @anaconda/7.2   
kernel.x86_64                                                        3.10.0-327.el7                                                     @anaconda/7.2   
kernel-headers.x86_64                                                3.10.0-327.el7                                                     @foundation-repo
kernel-tools.x86_64                                                  3.10.0-327.el7                                                     @anaconda/7.2   
kernel-tools-libs.x86_64                                             3.10.0-327.el7                                                     @anaconda/7.2   
Available Packages
kernel-abi-whitelists.noarch                                         3.10.0-327.el7                                                     rhel_7_2        
kernel-debug.x86_64                                                  3.10.0-327.el7                                                     rhel_7_2        
kernel-debug-devel.x86_64                                            3.10.0-327.el7                                                     rhel_7_2        
kernel-devel.x86_64                                                  3.10.0-327.el7                                                     rhel_7_2        
kernel-doc.noarch                                                    3.10.0-327.el7                                                     rhel_7_2        
texlive-l3kernel.noarch                                              2:svn29409.SVN_4469-38.el7                                         rhel_7_2        
[root@foundation ~]# 

How can I see also the kernel packages in RHEL 7.0? I want to be able to install it. And how can I force yum to install package on my desired repository? Example, I will install it from RHEL 7.0 repo instead from RHEL 7.2 repo.

6
  • you can exclude kernel package on 7.2 repo which you created. and then install from 7.0
    – Rahul
    Aug 29, 2016 at 6:21
  • 1
    Other than giving you really bad headaches, why would you want to include to similar versions of the same repo? I doubt you'll find any advantage and am certain you will encounter lots of version conflicts if you proceed with that. Aug 29, 2016 at 6:24
  • @JuliePelletier - I'm just doing some experimentations on my rhel 7.0 box by installing 2 different kernel versions
    – mit13
    Aug 29, 2016 at 6:29
  • A simpler approach would be to install the kernel from the 7.0, copy its files, make a custom boot loader entry, and install the one from 7.2. Aug 29, 2016 at 6:37
  • you can also use yumdb search from_repo your-7_0-repo'
    – Rahul
    Aug 29, 2016 at 6:52

1 Answer 1

1

From the inputs gathered from the folks above (Rahul and Julie Pelletier), I was able to install kernel package from a specific repo by disabling the repo you don't want to include (in my case it is rhel_7_0 repo).

yum --disablerepo rhel_7_0 install -y kernel

Then I was able to install kernel from rhel_7_2 repo inside my RHEL 7.0 box and boot successfully.

[root@desktop2 ~]# yum list kernel
Loaded plugins: product-id, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Installed Packages
kernel.x86_64                                              3.10.0-123.el7                                              @anaconda/7.0
kernel.x86_64                                              3.10.0-327.el7                                              @rhel_7_2    
[root@desktop2 ~]# grubby --default-kernel
/boot/vmlinuz-3.10.0-327.el7.x86_64
[root@desktop2 ~]# uname -r
3.10.0-327.el7.x86_64
[root@desktop2 ~]# 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .