RHEL OS upgrade 7 to 8 using local repo

 //OS upgrade RHEL 7 to 8


//for upgrade 7 to 8 current running OS version should be 7.6 or above. if not then need to upgrade 7.6 using yum update command.

[root@rhel7_6 boobi]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)

[root@rhel7_6 boobi]# uname -r
3.10.0-957.el7.x86_64

//make sue the local repo is configured with latest RHEL 8.4 image on this vm

[root@rhel7_6 boobi]# yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
repo id                                                                   repo name                                                                    status
AppStream                                                                 RHEL8.4Apps                                                                  6,036
BaseOS                                                                    RHEL8.4Base                                                                  1,709
repolist: 7,745

//check the subscription status, here no subscription
[root@rhel7_6 boobi]# subscription-manager list --installed
+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+
Product Name:   Red Hat Enterprise Linux Server
Product ID:     69
Version:        7.6
Arch:           x86_64
Status:         Not Subscribed
Status Details: Not supported by a valid subscription.
Starts:
Ends:

//set the subscribe manager release set

[root@rhel7_6 boobi]# subscription-manager release --set 7.6
No releases match '7.6'.  Consult 'release --list' for a full listing.

[root@rhel7_6 boobi]# subscription-manager release --list
No release versions available, please check subscriptions.

//make sure any version lock has been set

[root@rhel7_6 boobi]# yum versionlock clear
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is registered with an entitlement server, but is not receiving updates. You can use subscription-manager to assign subscriptions.
No such command: versionlock. Please use /usr/bin/yum --help

//update all available package and latest version 

[root@rhel7_6 boobi]# yum check-update

//when you go for #yum update it will give an error file mis match and dependency error conflict of 7 &8

//add rhel 7 server extras rpms

[root@rhel7_6 boobi]# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

[root@rhel7_6 boobi]# ls
epel-release-latest-7.noarch.rpm

[root@rhel7_6 boobi]# yum install epel-release-latest-7.noarch.rpm

//check and install "leapp" utility

//now download additional required data  which is required for leapp utility to upgrade form rhel 7 to 8 '/etc/leapp/files

#cd /etc/leapp/files/

#wget https://access.redhat.com/sites/default/files/attachments/leapp-data3.tar.gz

#tar -xf leapp-data3.tar.gz

#rm leapp-data3.tar.gz

//next start the process of upgrade

#leapp upgrade

#reboot

#cat /etc/redhat-release

//it seems to be updated rhel 7 to 8

Post a Comment

0 Comments