How to tie a system to a specific update of Red Hat Enterprise Linux?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 5
  • Red Hat Enterprise Linux (RHEL) 6
  • Red Hat Enterprise Linux (RHEL) 7
  • Red Hat Subscription Manager (RHSM)
  • Red Hat Network Classic
  • yum

Issue

  • Red Hat Network Classic provided Extended Update Support (EUS) subscriptions to set the preferred minor version of the registered system, but this same feature isn't visible in Red Hat Subscription Manager
  • How do I tie a system to a specific update in Red Hat Subscription Manager?
  • How do I tie a system to a specific update or minor release with Red Hat Network (RHN) Classic?
  • How do I prevent yum from updating or upgrading the minor release or kernel?
  • How to prevent system upgrade to the latest release from yum update ?
  • How to limit updates or upgrades to only security packages?
  • Executing subscription-manager release --set=6Server command outputs:
No releases match '6Server'.  Consult 'release --list' for a full listing

Resolution

IMPORTANT
It is important to understand that updates to non-current or older minor releases will not include all Security and Bug errata. Please refer to theRHEL Life Cycle documentation and the Extended Update Support (EUS) Add-On for further details.

It is only recommended to restrict the minor release update for minor releases still covered under the EUS program with the EUS repository channels enabled by a valid EUS subscription.

If changing release versions, ensure that yum's cache is cleared out with the command yum clean all.

To only allow security updates, follow the guide Is it possible to limit yum so that it lists or installs only security updates?

- To lock the minor release version in Red Hat Network Classic / Satellite5.x

In Red Hat Network Classic / Satellite5.x, the minor release update is available using EUS repository channels enabled by EUS subscription. However, you cannot lock the minor release version without EUS.

  • In RHN Classic, for example attach system's base channel to RHEL EUS server (e.g. 64-bit x86_64 version 6.6.z) repository, such as rhel-x86_64-server-6.6.z. Without the base channel attached, updating to the latest release is appeared.

  • For systems manged by satellite5.x, after syncing EUS channel with satellite 5.x, attach system's base channel.

    # satellite-sync -c rhel-x86_64-server-6.6.z
    

- To lock the minor version in Red Hat Subscription Manager (RHSM) / Satellite6.x

- Pre-configuration when using EUS repositories enabled by EUS Subscription

For clients managed by Satellite6.x, EUS repositories should be synced with Satellite6.x.

  • Confirm Pool IDs of RHEL Subscription and EUS Subscription, and attach it.

    # subscription-manager list --available
    Subscription Name: Extended Update Support
    ...
    
    # subscription-manager attach --pool= Pool ID of EUS Subscription
    Successfully attached a subscription for: Extended Update Support
    
    # subscription-manager attach --pool= Pool ID of RHEL Subscription
    
  • Disable standard repositories and enable EUS repositories.

    # subscription-manager repos --disable=rhel-6-server-rpms
    # subscription-manager repos --enable=rhel-6-server-eus-rpms
    # subscription-manager repos
    
    Repo ID: rhel-6-server-rpms
    Repo Name: Red Hat Enterprise Linux 6 Server (RPMs)
    Repo URL: https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/os
    Enabled: 0
    
    Repo ID: rhel-6-server-eus-rpms
    Repo Name: Red Hat Enterprise Linux 6 Server - Extended Update Support (RPMs)
    Repo URL: https://cdn.redhat.com/content/eus/rhel/server/6/$releasever/$basearch/os
    Enabled: 1
    
- Common Settings with/without EUS Entitlement
Temporary Setting

Use the --releasever=X.Y option with yum to override the major.minor release versions, where X is the major release and Y is the minor release. Since it is not persistent, this option would need to be repeated for later executions of yum.

# yum clean all
# yum --releasever=6.6 update
Permanent Setting
  • For systems not registered to Customer Portal or Satellite6.x

Updating the minor release can be prevented by adding the following line to /etc/yum.conf under the heading [main].

    [main]
distroverpkg=X.Y
  • For systems registered to Customer Portal or Satellite6.x

  • Use subscription-manager's "release" command to set the preferred minor version persistently, for example:

    • To determine which releases are available:

      #subscription-manager release --list
      
    • To set a release:

      # subscription-manager release --set=6.4
      # yum clean all
      
      # subscription-manager repos
      Repo ID: rhel-6-server-rpms
      Repo Name:Red Hat Enterprise Linux 6 Server (RPMs)
      Repo URL:https://cdn.redhat.com/content/dist/rhel/server/6/6.4/$basearch/os
      Enabled: 1
      
    • To determine which releases system are set to:

      # subscription-manager release --show
      
    • To unset a specific release:

      # subscription-manager release --unset
      # yum clean all
      # subscription-manager repos
      
      Repo ID: rhel-6-server-rpms
      Repo Name:Red Hat Enterprise Linux 6 Server (RPMs)
      Repo URL:https://cdn.redhat.com/content/dist/rhel/server/6/$releasever/$basearch/os
      Enabled: 1
      

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.