{"id":1032,"date":"2023-05-18T19:58:50","date_gmt":"2023-05-18T23:58:50","guid":{"rendered":"https:\/\/jasonralph.org\/?p=1032"},"modified":"2023-05-18T21:50:42","modified_gmt":"2023-05-19T01:50:42","slug":"upgrade-rocky-linux-8-to-9-cli","status":"publish","type":"post","link":"https:\/\/jasonralph.org\/?p=1032","title":{"rendered":"Upgrade Rocky Linux 8 to 9 CLI"},"content":{"rendered":"<p>I thought I would share my version of how I updated the server that runs this blog from Rocky 8 to Rocky 9 without a clean install. I want to mention this is a do at your own risk post, this is not officially supported.  <\/p>\n<blockquote><p>!!!Do not attempt this if you do not have backups and a way to fully recover your system.!!!<\/p><\/blockquote>\n<p>The first step I took was go to the rocky download site and make sure I grabbed the latest GPG, RELEASE and REPOS:<\/p>\n<p><a href=\"https:\/\/download.rockylinux.org\/pub\/rocky\/9\/BaseOS\/x86_64\/os\/Packages\/r\/\">https:\/\/download.rockylinux.org\/pub\/rocky\/9\/BaseOS\/x86_64\/os\/Packages\/r\/<\/a><\/p>\n<p>You will need to modify the below command to match the version you find in the above site, once that is complete you can run it.  <\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# dnf install -y https:\/\/download.rockylinux.org\/pub\/rocky\/9\/BaseOS\/x86_64\/os\/Packages\/r\/{rocky-gpg-keys-9.2-1.4.el9.noarch.rpm,rocky-release-9.2-1.4.el9.noarch.rpm,rocky-repos-9.2-1.4.el9.noarch.rpm}\r\n<\/pre>\n<p>One road block was dnf did not like that I had remi and epel release 8, so I removed them and it went fine. <\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# dnf install -y https:\/\/download.rockylinux.org\/pub\/rocky\/9\/BaseOS\/x86_64\/os\/Packages\/r\/{rocky-gpg-keys-9.2-1.4.el9.noarch.rpm,rocky-release-9.2-1.4.el9.noarch.rpm,rocky-repos-9.2-1.4.el9.noarch.rpm}\r\nLast metadata expiration check: 0:20:38 ago on Thu 18 May 2023 10:27:24 PM UTC.\r\nrocky-gpg-keys-9.2-1.4.el9.noarch.rpm                                                                                                                                                                                                   169 kB\/s |  12 kB     00:00    \r\nrocky-release-9.2-1.4.el9.noarch.rpm                                                                                                                                                                                                    403 kB\/s |  23 kB     00:00    \r\nrocky-repos-9.2-1.4.el9.noarch.rpm                                                                                                                                                                                                      298 kB\/s |  12 kB     00:00    \r\nError: \r\n Problem: problem with installed package remi-release-8.7-2.el8.remi.noarch\r\n  - package remi-release-8.7-2.el8.remi.noarch requires system-release(releasever) = 8, but none of the providers can be installed\r\n  - package remi-release-8.4-1.el8.remi.noarch requires system-release(releasever) = 8, but none of the providers can be installed\r\n  - package remi-release-8.5-2.el8.remi.noarch requires system-release(releasever) = 8, but none of the providers can be installed\r\n  - package remi-release-8.5-3.el8.remi.noarch requires system-release(releasever) = 8, but none of the providers can be installed\r\n  - package remi-release-8.6-1.el8.remi.noarch requires system-release(releasever) = 8, but none of the providers can be installed\r\n  - cannot install both rocky-release-9.2-1.4.el9.noarch and rocky-release-8.7-1.2.el8.noarch\r\n  - conflicting requests\r\n(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)\r\n<\/pre>\n<p>Find the epel and remi release rpms:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# rpm -qa| grep release\r\nremi-release-8.7-2.el8.remi.noarch\r\nepel-release-8-19.el8.noarch\r\nrocky-release-8.7-1.2.el8.noarch\r\n<\/pre>\n<p>Remove them:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# yum remove epel-release-8-19.el8.noarch remi-release-8.7-2.el8.remi.noarch\r\n<\/pre>\n<p>Upgrade your system to 9 from 8:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# dnf install -y https:\/\/download.rockylinux.org\/pub\/rocky\/9\/BaseOS\/x86_64\/os\/Packages\/r\/{rocky-gpg-keys-9.2-1.4.el9.noarch.rpm,rocky-release-9.2-1.4.el9.noarch.rpm,rocky-repos-9.2-1.4.el9.noarch.rpm}\r\n<\/pre>\n<p>I ignored this error, it seems like its just a GPG error:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n  Running scriptlet: rocky-gpg-keys-8.7-1.2.el8.noarch                                                                                                                                                                                                              6\/6 \r\nLine is not an assignment at '\/usr\/lib\/sysctl.d\/50-redhat.conf:8': (null)\r\nCouldn't write '1' to 'net\/ipv4\/conf\/*\/rp_filter', ignoring: No such file or directory\r\nwarning: %transfiletriggerin(systemd-239-68.el8_7.4.x86_64) scriptlet failed, exit status 1\r\n\r\nError in <unknown> scriptlet in rpm package rocky-gpg-keys\r\n<\/pre>\n<p>Verify:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# cat \/etc\/rocky-release\r\nRocky Linux release 9.2 (Blue Onyx)\r\n<\/pre>\n<p>Rebuild the RPM database to now use SQLITE:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# rpm --rebuilddb\r\n<\/pre>\n<p>Thats it, reboot:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# reboot\r\n<\/pre>\n<p>I did have some issues with dnf where I needed to reset some modules.  <\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]#  dnf check\r\nModular dependency problems:\r\n\r\n Problem 1: conflicting requests\r\n  - nothing provides module(platform:el8) needed by module httpd:2.4:8070020230406163027:3b9f49c4.x86_64\r\n Problem 2: conflicting requests\r\n  - nothing provides module(platform:el8) needed by module mariadb:10.3:8060020220913075833:d63f516d.x86_64\r\n Problem 3: conflicting requests\r\n  - nothing provides module(platform:el8) needed by module mysql:8.0:8060020221025174942:d63f516d.x86_64\r\n Problem 4: conflicting requests\r\n  - nothing provides module(platform:el8) needed by module nginx:1.14:8040020210610090123:9f9e2e7e.x86_64\r\n<\/pre>\n<p>I needed to reset the modules one by one, there may be more on your system:<\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n[root@rocky-us-east-jasonralph ~]# dnf module reset httpd:2.4 mariadb:10.3 mysql:8.0 nginx:1.14\r\n<\/pre>\n<p>That seemed to fix it, good luck. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>I thought I would share my version of how I updated the server that runs this blog from Rocky 8 to Rocky 9 without a clean install. I want to mention this is a do at your own risk post, this is not officially supported. !!!Do not attempt this if you do not have backups [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[123,70,12,120,121,122],"class_list":["post-1032","post","type-post","status-publish","format-standard","hentry","category-general-code","tag-123","tag-70","tag-linux","tag-rocky","tag-rpm","tag-upgrade"],"_links":{"self":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts\/1032","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1032"}],"version-history":[{"count":17,"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts\/1032\/revisions"}],"predecessor-version":[{"id":1049,"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts\/1032\/revisions\/1049"}],"wp:attachment":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1032"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1032"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1032"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}