{"id":61060,"date":"2024-04-22T14:44:28","date_gmt":"2024-04-22T09:14:28","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=61060"},"modified":"2024-04-29T15:09:22","modified_gmt":"2024-04-29T09:39:22","slug":"migrated-the-os-from-rhel7-to-rhel8-without-creating-new-servers","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/migrated-the-os-from-rhel7-to-rhel8-without-creating-new-servers\/","title":{"rendered":"Migrated the OS from RHEL7 to RHEL8 without creating new servers"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<p>Exploring the challenge of upgrading servers from RHEL7 to RHEL 8 while avoiding<br \/>\nthe need for a fresh installation, we delve into the intricacies and solutions for customers seeking seamless transitions.<\/p>\n<h2><strong>Solution<\/strong><\/h2>\n<p>We have installed the LEAPP utility servers and migrated the OS from RHEL7 to RHEL8 with<br \/>\nthe help of LEAPP<\/p>\n<h3><strong>Steps followed are mentioned below<\/strong><\/h3>\n<p><strong>STEP 1<\/strong>:<br \/>\nTo upgrade from RHEL 7 to 8, first, it is necessary to upgrade the instance to the latest minor release of RHEL 7. This can be done using the following commands :<\/p>\n<pre><strong>sudo su<\/strong>\r\n<strong>yum update-y<\/strong>\r\n<strong>reboot<\/strong><\/pre>\n<p>After rebooting the instance, make sure that the upgrade has worked and the instance has booted with the latest RHEL 7 kernel available :<\/p>\n<p><strong>STEP 2:<\/strong><br \/>\nSince we are upgrading using RHUI on a public cloud, we need to enable the required RHUI repositories and install the required RHUI packages to ensure our system is ready for upgrade. In order to perform further steps, a utility called &#8220;leapp&#8221; must be installed.<\/p>\n<p>Leapp is a CLI tool that helps users with the installation process and makes the in-place upgrade easier. Hence, to install it, first enable the necessary RHUI repositories and then install the package. Both these tasks can be done using the following command:<\/p>\n<pre>yum install-y leapp leapp-rhui-aws leapp-repository leapp-repository-deps lvm2-python-boom--enablerepo=*<\/pre>\n<p><strong>STEP 3:<\/strong><br \/>\nFor a successful in-place upgrade from Red Hat Enterprise Linux 7 to Red Hat Enterprise Linux 8, the Leapp utility requires data attached to this article to be placed in the \/etc\/leapp\/files\/ directory on the target system.<\/p>\n<p>The data files include RPM package changes (<strong>pes-events.json<\/strong>), RPM repository mapping<br \/>\n(<strong>repomap.csv<\/strong>), and information about removed or unsupported kernel drivers<br \/>\n(<strong>unsupported_driver_names.json, unsupported_pci_ids.json<\/strong>). You can download the file<br \/>\nleapp-data17.tar.gz from the link below and move it to your RHEL 7 instance.<\/p>\n<p><strong>https:\/\/access.redhat.com\/articles\/3664871<\/strong><\/p>\n<p>I have also attached it to this KUMO. Please check the attachment. After copying the archive, run the following command to extract it and copy the contents to- &#8220;\/etc\/leapp\/files&#8221; directory :<\/p>\n<p><strong>tar-xzf leapp-data17.tar.gz-C \/etc\/leapp\/files &amp;&amp; rm-rf leapp-data17.tar.gz<\/strong><\/p>\n<p><strong>STEP 4:<\/strong><br \/>\nAfter copying these files, check if pam is using &#8220;pam_pkcs11.so&#8221; because during the in-place<br \/>\nupgrade, the deprecated pam_krb5 or pam_pkcs11 pluggable authentication modules (PAM) are removed. To work around this problem, reconfigure your RHEL 7 system so you do not use pam_krb5 or pam_pkcs11 before upgrading. To do this, edit the files below :<\/p>\n<pre>vi \/etc\/pam.d\/smartcard-auth-ac\r\n\"pam_pkcs11.so\").\r\nvi \/etc\/ssh\/sshd_config<\/pre>\n<p>(In this file, comment on all the entries which contain<br \/>\n(In this file uncomment permit root login option).<\/p>\n<p><strong>STEP 5:<\/strong><br \/>\nPerform the pre-upgrade phase by running the command :<br \/>\n<strong>leapp preupgrade&#8211;no-rhsm<\/strong><\/p>\n<p><strong>STEP 6:<\/strong><br \/>\nAfter the command returns successfully, perform the actual upgrade using Leapp :<br \/>\n<strong>leapp upgrade&#8211;no-rhsm<\/strong><\/p>\n<p><strong>STEP 7:<\/strong><br \/>\nThen reboot the EC2 instance :<\/p>\n<p><strong>Reboot<\/strong><br \/>\nIt might take a couple of minutes to boot it for the first time. After rebooting, check if the instance is booted with a newer kernel or newer release. Please also check the status of the instance screenshot from the EC2 dashboard.<\/p>\n<pre>cat \/etc\/redhat-release\r\nRed Hat Enterprise Linux release 8.4 (Ootpa)\r\nuname-r\r\n4.18.0-305.el8.x86_64<\/pre>\n<div class=\"ap-custom-wrapper\"><\/div><!--ap-custom-wrapper-->","protected":false},"excerpt":{"rendered":"<p>Introduction Exploring the challenge of upgrading servers from RHEL7 to RHEL 8 while avoiding the need for a fresh installation, we delve into the intricacies and solutions for customers seeking seamless transitions. Solution We have installed the LEAPP utility servers and migrated the OS from RHEL7 to RHEL8 with the help of LEAPP Steps followed [&hellip;]<\/p>\n","protected":false},"author":1715,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":122},"categories":[4308],"tags":[1703,5852],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/61060"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1715"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=61060"}],"version-history":[{"count":5,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/61060\/revisions"}],"predecessor-version":[{"id":61489,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/61060\/revisions\/61489"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=61060"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=61060"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=61060"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}