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.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. We are beginning with these four terms: master, slave, blacklist, and whitelist. Because of the enormity of this endeavor, these changes will be implemented gradually over several upcoming releases. For more details, see our CTO Chris Wright’s message.

Providing feedback on Red Hat documentation

We appreciate your feedback on our documentation. Let us know how we can improve it.

Submitting feedback through Jira (account required)

  1. Log in to the Jira website.
  2. Click Create in the top navigation bar.
  3. Enter a descriptive title in the Summary field.
  4. Enter your suggestion for improvement in the Description field. Include links to the relevant parts of the documentation.
  5. Click Create at the bottom of the dialogue.

Key migration terminology

While the following migration terms are commonly used in the software industry, these definitions are specific to Red Hat Enterprise Linux (RHEL).

Update

Sometimes called a software patch, an update is an addition to the current version of the application, operating system, or software that you are running. A software update addresses any issues or bugs to provide a better experience of working with the technology. In RHEL, an update relates to a minor release, for example, updating from RHEL 8.1 to 8.2.

Upgrade

An upgrade is when you replace the application, operating system, or software that you are currently running with a newer version. Typically, you first back up your data according to instructions from Red Hat. When you upgrade RHEL, you have two options:

  • In-place upgrade: During an in-place upgrade, you replace the earlier version with the new version without removing the earlier version first. The installed applications and utilities, along with the configurations and preferences, are incorporated into the new version.
  • Clean install: A clean install removes all traces of the previously installed operating system, system data, configurations, and applications and installs the latest version of the operating system. A clean install is ideal if you do not need any of the previous data or applications on your systems or if you are developing a new project that does not rely on prior builds.

Operating system conversion

A conversion is when you convert your operating system from a different Linux distribution to Red Hat Enterprise Linux. Typically, you first back up your data according to instructions from Red Hat.

Migration

Typically, a migration indicates a change of platform: software or hardware. Moving from Windows to Linux is a migration. Moving a user from one laptop to another or a company from one server to another is a migration. However, most migrations also involve upgrades, and sometimes the terms are used interchangeably.

  • Migration to RHEL: Conversion of an existing operating system to RHEL
  • Migration across RHEL: Upgrade from one version of RHEL to another

Chapter 1. Planning an upgrade

An in-place upgrade is the recommended way to upgrade 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 64-bit 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.9.
  4. Prepare the RHEL 7 system for the upgrade to RHEL 8 and update the RHEL 7 system to the latest version of RHEL 7.9.
  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.
  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

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 Preparing a RHEL 6 system for the upgrade section in the Upgrading from RHEL 6 to RHEL 7 documentation.

Chapter 3. Upgrading from RHEL 6.10 to RHEL 7.9

The in-place upgrade from RHEL 6 to RHEL 7 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 the Assessing upgrade suitability section in the Upgrading from RHEL 6 to RHEL 7 documentation.
  2. Use the Red Hat Upgrade Tool to upgrade to RHEL 7.9. For a detailed procedure, see the Upgrading your system from RHEL 6 to RHEL 7 section in the Upgrading from RHEL 6 to RHEL 7 documentation.

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

To prepare your RHEL 7 system for the upgrade to RHEL 8, follow these steps before proceeding with the upgrade:

  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 the latest RHEL 7.9 version 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 for the upgrade chapter in the Upgrading from RHEL 7 to RHEL 8 document.

Chapter 5. Upgrading from RHEL 7.9 to RHEL 8

Similarly to the in-place upgrade from RHEL 6 to RHEL 7, the in-place upgrade from RHEL 7 to RHEL 8 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. Note that RHEL version 7.9 is a prerequisite for upgrading to RHEL 8.

To perform an in-place upgrade from RHEL 7.9 to RHEL 8:

  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

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. Perform major recommended tasks to ensure your system is supported. For a list of recommended steps, see the Performing post-upgrade tasks chapter in the Upgrading from RHEL 7 to RHEL 8 document.
  3. 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.
  4. 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.

  5. 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.

  6. 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

After the RHEL 6 to RHEL 7 and RHEL 7 to RHEL 8 in-place upgrade, you might encounter package-related issues. You can troubleshoot and resolve many of these issues using the steps below.

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 -qa | grep -e '\.el6' | grep -vE '^(gpg-pubkey|katello-ca-consumer)' | sort
    • On RHEL 8, enter:

      # rpm -qa | grep -e '\.el[67]' | grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' | sort
  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.

  3. After performing the in-place upgrade to RHEL 8, remove the kernel-workaround package:

    # yum -y remove kernel-workaround

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 Upgrading from RHEL 6 to RHEL 7 documentation
  • From RHEL 7 to RHEL 8, see the known issues section in the Upgrading from RHEL 7 to RHEL 8 documentation

7.5. Additional resources

Legal Notice

Copyright © 2024 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.