How to Upgrade from RHEL 7 to RHEL 8

[‘

n

Red Hat has announced the release of Red Hat Enterprise Linux 8.0, which comes with GNOME 3.28 as the default desktop environment and runs on Wayland.

n

This article describes instructions on how to upgrade from Red Hat Enterprise Linux 7 to Red Hat Enterprise Linux 8 using the Leapp utility.

n

If you’re looking for a fresh RHEL 8 installation, head over to our article: Installation of RHEL 8 with Screenshots

n

Requirements

n

An in-place upgrade to RHEL 8 is presently supported only on systems meeting the following requirements:

n

    n

  • RHEL 7.6 installed
  • n

  • The Server variant
  • n

  • The Intel 64 architecture
  • n

  • At least 100MB of free space available on the boot partition (mounted at /boot).
  • n

n

Preparing an RHEL 7 For The Upgrade

n

1. Make sure you are using RHEL 7.6 version, if you’re using RHEL version older than RHEL 7.6, you need to update your RHEL system to RHEL 7.6 version using following yum command.

n

# yum updatern

n

Update RHEL 7 System
Update RHEL 7 System

n

Note: Make sure your RHEL 7 system has been successfully registered using the Red Hat Subscription Manager to enable system repositories and perform a full system update.

n

2. Make sure your RHEL 7 system has the Red Hat Enterprise Linux Server subscription attached. If not, run the following commands to automatically assign the subscription to the system and verify the subscription.

n

# subscription-manager attach --autorn# subscription-manager list --installedrn

n

Check RHEL Server Subscription
Check RHEL Server Subscription

n

3. Now set the RHEL 7.6 version as a beginning point for the upgrade using the following command.

n

# subscription-manager release --set 7.6rn

n

Set RHEL Release Upgrade
Set RHEL Release Upgrade

n

4. If you have used yum-plugin-versionlock plug-in to lock packages to a specific version, make sure to remove the lock by running the following command.

n

# yum versionlock clearrn

n

5. Update all software packages to the latest version and reboot the system.

n

# yum updatern# rebootrn

n

6. Once system booted, make sure to enable the Extras repository for software package dependencies.

n

# subscription-manager repos --enable rhel-7-server-extras-rpmsrn

n

Enable Extras Repository on RHEL
Enable Extras Repository on RHEL

n

7. Install the Leapp utility.

n

# yum install leapprn

n

Install Leapp Tool in RHEL
Install Leapp Tool in RHEL

n

8. Now download additional required data files, which is required by the Leapp utility for a successful upgrade from RHEL 7 to RHEL 8 and place them in the /etc/leapp/files/ directory.

n

# cd /etc/leapp/files/ rn# wget https://access.redhat.com/sites/default/files/attachments/leapp-data3.tar.gzrn# tar -xf leapp-data3.tar.gz rn# rm leapp-data3.tar.gzrn

n

Download Files for Leapp
Download Files for Leapp

n

9. Make sure to take a full RHEL 7.6 system backup, before performing the upgrade using this article: backup and restore RHEL system with the dump/restore commands.

n

If the upgrade fails, you should able to get your system to the pre-upgrade state if you follow the standard backup instructions provides in the above article.

n

Upgrading from RHEL 7 TO RHEL 8

n

10. Now start the RHEL 7 system upgrade process using the following command.

n

# leapp upgradern

n

Leapp RHEL Upgrade
Leapp RHEL Upgrade

n

Once you run the upgrade process, the Leapp utility gathers data about your system, tests the upgradability, and creates a pre-upgrade report in the /var/log/leapp/leapp-report.txt file.

n

If the system is upgradable, Leapp downloads required data and create an RPM transaction for the upgrade.

n

If the system is not upgradeable, Leapp closes the upgrade operation and creates a record explaining the issue and a solution in the /var/log/leapp/leapp-report.txt file.

n

11. Once upgrades finish, manually reboot the system.

n

# rebootrn

n

At this stage, the system boots into an RHEL 8-based initial RAM disk image, initramfs. Leapp upgrades all software packages and automatically reboots to the RHEL 8 system.

n

RHEL Upgrade Process
RHEL Upgrade Process

n

12. Now Log in to the RHEL 8 system and change the SELinux mode to enforcing.

n

# setenforce 1rn

n

Set SELinux to Enforcing in RHEL 8
Set SELinux to Enforcing in RHEL 8

n

13. Enable the firewall.

n

# systemctl start firewalldrn# systemctl enable firewalldrn

n

For more information, see how to configure firewall using firewalld.

n

Verifying RHEL 8 Upgrade

n

14. After the upgrade completes, verify that the current OS version is Red Hat Enterprise Linux 8.

n

# cat /etc/redhat-releasernrnRed Hat Enterprise Linux release 8.0 (Ootpa)rn

n

Check RHEL 8 Release
Check RHEL 8 Release

n

15. Check the OS kernel version of Red Hat Enterprise Linux 8.

n

# uname -rrnrn4.18.0-80.el8.x86_64rn

n

Check RHEL 8 Kernel Version
Check RHEL 8 Kernel Version

n

16. Verify that the correct Red Hat Enterprise Linux 8 is installed.

n

# subscription-manager list --installedrn

n

Check RHEL Installed Subscription
Check RHEL Installed Subscription

n

17. Optionally, set the hostname in Red Hat Enterprise Linux 8 using hostnamectl command.

n

# hostnamectl set-hostname tecmint-rhel8rn# hostnamectlrn

n

Set Hostname in RHEL 8
Set Hostname in RHEL 8

n

18. Finally, verify that network services are functional by connecting to a Red Hat Enterprise Linux 8 server using SSH.

n

# ssh [emailxa0protected]rn# hostnamectlrn

n

SSH to RHEL 8
SSH to RHEL 8

n

‘]