Upgrading from RHEL 6 to RHEL 8

Red Hat Enterprise Linux 8

Instructions for an in-place upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 8

Red Hat Customer Content Services

Abstract

This document provides instructions on how to perform an in-place upgrade from Red Hat Enterprise Linux (RHEL) 6 to RHEL 8. Upgrading to RHEL 8 is a two-stage process. First you have to upgrade your system from RHEL 6 to RHEL 7 followed by an upgrade to RHEL 8.

Preface

The guidelines in this document frequently refer to the following existing documentation:

This document also includes additional instructions specific to upgrading from RHEL 6 to RHEL 8.

Providing feedback on Red Hat documentation

We appreciate your input on our documentation. Please let us know how we could make it better. To do so:

  • For simple comments on specific passages:

    1. Make sure you are viewing the documentation in the Multi-page HTML format. In addition, ensure you see the Feedback button in the upper right corner of the document.
    2. Use your mouse cursor to highlight the part of text that you want to comment on.
    3. Click the Add Feedback pop-up that appears below the highlighted text.
    4. Follow the displayed instructions.
  • For submitting more complex feedback, create a Bugzilla ticket:

    1. Go to the Bugzilla website.
    2. As the Component, use Documentation.
    3. Fill in the Description field with your suggestion for improvement. Include a link to the relevant part(s) of documentation.
    4. Click Submit Bug.

Chapter 1. Planning an upgrade

An in-place upgrade is the recommended way to migrate your system to a later major version of RHEL.

Important

Before you start, Red Hat recommends that you read this reference, including the linked documents, to prevent a situation when certain changes to your system have been done but you are unable to proceed with the upgrading process. Especially, ensure that your system meets the requirements described in this document and that you are aware of the known limitations.

1.1. Requirements

The following are the general criteria a system must meet to upgrade from RHEL 6 to RHEL 8:

  • The architecture is Intel 64 or IBM Z.
  • The RHEL Server variant is installed.
  • The FIPS mode is disabled.
  • The system contains no LUKS-encrypted partitions or volumes.
  • Minimum hardware requirements for RHEL 8 are met.
  • Access to repositories with RHEL 6, RHEL 7 and RHEL 8 content is provided.

Note that there can be further requirements and limitations. For details, see:

1.2. Considerations

You should consider the following before upgrading:

  • Significant changes between the RHEL major releases

    For details, see:

  • Applications not distributed by Red Hat

    If you run applications on a system you want to upgrade that are not provided by Red Hat, consider the following:

    • For RPM-based applications:

      • You require packages that are compatible with the particular target version.
      • The packages, including all dependencies, are available in a repository to which you have access.
    • For non-RPM-based applications:

      • Dependencies and libraries might have changed during these two major version upgrades. Make sure that the dependencies and libraries are available on the particular target version.
      • If the applications are written in an interpreted language, such as Python or Ruby, review whether all libraries are available on the target version.

1.3. Overview of the upgrading process

An in-place upgrade from RHEL 6 to RHEL 8 requires the following major steps:

  1. Prepare the RHEL 6 system for the upgrade and update the RHEL 6 system to the latest version of RHEL 6.10.
  2. Perform a pre-upgrade assessment of the RHEL 6 system and resolve reported problems.
  3. Perform an in-place upgrade to RHEL 7.6.
  4. Prepare the RHEL 7 system for the upgrade to RHEL 8 and update the RHEL 7 system to RHEL 7.8.
  5. Perform a pre-upgrade assessment of the RHEL 7 system and resolve problems identified in this phase.
  6. Perform an in-place upgrade to RHEL 8.2.
  7. Verify the state of the upgraded system.

For detailed instructions, see the following chapters.

Chapter 2. Preparing a RHEL 6 system for an upgrade to RHEL 7

This section provides an overview of steps necessary to prepare a RHEL 6 system for an upgrade to RHEL 7.

To prepare your RHEL 6 system for an in-place upgrade to RHEL 7, perform the following steps:

  1. Back up the RHEL 6 system, and ensure that the backup is recoverable.

    For details about creating backups in your environment, see the documentation of your backup software. The following list provides additional resources about backup and recovery:

  2. Update the RHEL 6 system to RHEL 6.10, and reboot the host:

    # yum update
    # reboot
  3. Enable the RHEL 6 Extras repository, and install the utilities required for the in-place upgrade to RHEL 7. For details, see the Step 1: Prepare the system section in the How do I upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7 document.

Chapter 3. Upgrading from RHEL 6.10 to RHEL 7.6

This section describes the key steps for an in-place upgrade from RHEL 6 to RHEL 7.

The in-place upgrade consists of two major stages, a pre-upgrade assessment of the system, and the actual in-place upgrade:

  • In the pre-upgrade phase, the Preupgrade Assistant collects information from the system, analyzes it, and suggests possible corrective actions. The Preupgrade Assistant does not make any changes to your system.
  • In the in-place upgrade phase, the Red Hat Upgrade Tool installs RHEL 7 packages and adjusts basic configuration where possible.

To perform an in-place upgrade from RHEL 6 to RHEL 7:

  1. Assess the upgradability of your system using the Preupgrade Assistant, and fix problems identified in the report before you proceed with the upgrade. For detailed instructions, see Step 2: Perform the system assessment in the How do I upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7 document.
  2. Use the Red Hat Upgrade Tool to upgrade to RHEL 7.6. For a detailed procedure, see the Step 3: Perform the upgrade section in How do I upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7.

Chapter 4. Preparing the RHEL 7 system for an upgrade to RHEL 8

This section describes actions you need to perform on your RHEL 7 system before you can proceed with the upgrade to RHEL 8.

To prepare your RHEL 7 system for the upgrade to RHEL8, follow these steps:

  1. Migrate the GRUB Legacy boot loader to GRUB2

    After the upgrade, RHEL 7 still uses the GRUB Legacy boot loader. However, GRUB Legacy is not supported on RHEL 7 and later versions. Therefore, you must manually migrate the boot loader to GRUB2. For details, see the Upgrading from GRUB Legacy to GRUB 2 section in the RHEL 7 System Administrator’s Guide.

  2. Resolve potential problems with installed packages. For details, see Section 7.1, “Ensuring that installed packages match the current major RHEL version”.
  3. Adjust custom System V and Upstart scripts to systemd services.

    On a RHEL 7 system, systemd replaces Upstart as the init system. To use the features systemd provides, such as parallel startup of system services at boot time, manually convert legacy System V and Upstart scripts to systemd services. For details, see Converting traditional sysV init scripts to Red Hat Enterprise Linux 7 systemd unit files.

  4. Update paths to system directories in your scripts.

    On a RHEL 7 system, the /bin, /sbin, /lib, and /lib64 directories have been replaced by symbolic links to their corresponding directory in /usr. For example, on RHEL 8, /bin is a symbolic link to the /usr/bin/ directory.

    If you use scripts or applications that expect /bin, /sbin, /lib, and /lib64 to be real directories, adjust them accordingly. For example, you can update the scripts and applications to:

    • Use the paths in /usr, such as /usr/bin/
    • Accept that /bin, /sbin, /lib, and /lib64 are symbolic links instead of directories
  5. Update your YUM scripts and plug-ins to use the YUM 4 API.

    RHEL 8 no longer supports the Python API of YUM 3. If you use any scripts or YUM plug-ins that use the legacy API, migrate them to the YUM 4 API. For more information, see Notable changes to the YUM stack.

  6. If you miss certain packages after the upgrade, see the Section 7.3, “Installing missing packages after upgrading to RHEL 7” section in the Troubleshooting chapter.
  7. Review the Considerations in adopting RHEL 8 document and make additional changes to your system if needed.
  8. Update your system to RHEL 7.8 and reboot the host:

    # yum update
    # reboot
  9. Ensure that all your applications and services are configured and work as expected. For example, if you run a DNS server on the host, verify that the configuration is still valid after the upgrade and that the service works in the same way as it did before the upgrade.
  10. Follow the preparation steps described in the Preparing a RHEL 7 system for the upgrade chapter in the Upgrading from RHEL 7 to RHEL 8 document.

Chapter 5. Upgrading from RHEL 7.8 to RHEL 8.2

This section describes how to update a RHEL 7 host to RHEL 8. Note that RHEL version 7.8 is a prerequisite for upgrading to RHEL 8.2.

Similarly to the in-place upgrade from RHEL 6 to RHEL 7, the in-place upgrade consists of two major stages, a pre-upgrade assessment of the system in which the system remains unchanged, and the actual in-place upgrade. In case of a RHEL 7 to RHEL 8 upgrade, both phases are handled by the Leapp utility.

To perform an in-place upgrade from RHEL 7.8 to RHEL 8.2:

  1. Assess the upgradability of your system and fix reported problems as described in Reviewing the pre-upgrade report of the Upgrading from RHEL 7 to RHEL 8 document.
  2. Upgrade your RHEL 7 system to RHEL 8 per instructions in Performing the upgrade from RHEL 7 to RHEL 8 of the Upgrading from RHEL 7 to RHEL 8 document.

Additional resources

Chapter 6. Performing post-upgrade tasks

This section suggests major actions you should take after upgrading the system to RHEL 8.

After you have upgraded your system to RHEL 8, complete especially the following tasks:

  1. Verify the state of the upgraded system. For a list of recommended steps, see the Verifying the post-upgrade state of the RHEL 8 system chapter in the Upgrading from RHEL 7 to RHEL 8 document.
  2. Re-evaluate and re-apply your security policies. For detailed instructions, see the Applying security policies section in the Upgrading from RHEL 7 to RHEL 8 document.
  3. Restore the default SELinux security contexts on the file system:

    # restorecon -Rv /

    Note that restoring the SELinux security contexts can be time-consuming on large file systems. Optionally, you can exclude large or remote file systems, by using the -e directory parameter. For further details, see the restorecon(8) man page.

  4. Manually migrate applications that were not handled during the upgrade. This can apply both to applications available in the base RHEL and applications provided by Red Hat Software Collections, Red Hat Developer Toolset, or Red Hat Developer Tools.

    On a RHEL 8 host, a number of user space components are distributed as Application Streams. For information about using Application Streams, see the Installing, managing, and removing user-space components documentation.

    For migration instructions, see the RHEL 8 documentation on the Red Hat Customer Portal for the respective component, for example for databases, the Database servers chapter in the Deploying different types of servers documentation.

  5. Resolve potential problems with installed packages. For details, see Section 7.1, “Ensuring that installed packages match the current major RHEL version”.

Chapter 7. Troubleshooting

This section describes how to troubleshoot and solve package-related issues after the in-place upgrade from both RHEL 6 to RHEL 7 and RHEL 7 to RHEL 8.

7.1. Ensuring that installed packages match the current major RHEL version

Ensure that only packages are installed that have been built for the currently installed major RHEL version:

  1. To display installed packages for a different major RHEL version:

    • On RHEL 7, enter:

      # rpm -aq | grep -v -e '[.]el7' -e '^gpg-pubkey-'
    • On RHEL 8, enter:

      # rpm -aq | grep -v -e '[.+]el8' -e '^gpg-pubkey-' -e '^libmodulemd1-'
  2. Remove or replace the packages reported in the previous step, because they are not supported. For details see the Can I install packages from different versions of RHEL? document.

    If the command in the previous step did not display any output, all installed packages were built for the installed major RHEL version and no further actions are required.

7.2. Fixing dependency errors

After an in-place upgrade, it is possible that packages are installed while some of their dependencies have been removed by the upgrade tool. To solve this problem:

  1. Identify dependencies errors:

    # yum check dependencies

    If the command displays no output, no further actions are required.

  2. To fix dependency errors, reinstall the affected packages. During this operation, the yum utility automatically installs missing dependencies. If the required dependencies are not available in the repositories, install these packages manually.

7.3. Installing missing packages after upgrading to RHEL 7

If you miss certain packages after the upgrade from RHEL 6 to RHEL 7, you probably did not provide a repository to the Red Hat Upgrade Tool that contained these packages. To install these packages after the upgrade, you can use, for example, the following commands:

# cd /root/preupgrade
# bash noauto_postupgrade.d/install_rpmlist.sh kickstart/RHRHEL7rpmlist_kept

Note that different issues can prevent installing the RPMs. In this case, resolve the problems. For further details about other files with lists of packages you should install on the upgraded system, see the /root/preupgrade/kickstart/README file and the pre-upgrade report.

7.4. Known issues

For known issues when upgrading:

  • From RHEL 6 to RHEL 7, see the known issues section in the How do I upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7 documentation
  • From RHEL 7 to RHEL 8, see the known issues section in the Upgrading from RHEL 7 to RHEL 8 documentation

Chapter 8. Additional resources

Legal Notice

Copyright © 2020 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.