Difference between revisions of "Rocky 9.x Upgrade Rocky 8.x to Rocky 9.x"

From Notes_Wiki
m
m
 
Line 7: Line 7:
#:: dnf update -y --skip-broken --nobest --allowerasing
#:: dnf update -y --skip-broken --nobest --allowerasing
#:</pre>
#:</pre>
# Consider doing below till it succeeds:
#:<pre>
#::    sudo dnf upgrade --refresh
#:</pre>
#: If you neeed to remove some package for above to work then after every single removal try above command again till it completes successfully.
# A few articles suggested doing: <source type="bash">
cd /etc/yum.repos.d
rm -f CentOS* _copr* weewx.repo zmrepo*
mv -f Rocky-PowerTools.repo.rpmnew Rocky-PowerTools.repo
</source>
# Go to URL https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/
# Go to URL https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/
# Note package names for rocky-release, rocky-repos and rocky-gpg-keys.  Eg at time of this writing values were:<source type="bash">
# Note package names for rocky-release, rocky-repos and rocky-gpg-keys.  Eg at time of this writing values were:<source type="bash">
Line 30: Line 40:
#:: sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y
#:: sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y
#:</pre>
#:</pre>
#: If above throws errors then please try:
#: If above throws errors then please try <source type="bash">
#::<pre>
dnf remove openssl3-libs
#::: sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y --skip-broken --nobest
dnf remove python39-six
#::</pre>
dnf remove epel-release
# If there are still errors we may have to remove those packages.  For example
dnf remove libvpx6 iptables-ebtables
#:<pre>
</source>
#:: dnf remove openssl3-libs
#* As a last resort you can consider running:
#:: dnf remove python39-six
#*:<pre>
#:: dnf remove epel-release
#*:: sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y --skip-broken --nobest
#:</pre>
#*:</pre>
#: and then try distro-sync again.  Note the names of packages being removed including the ones getting removed due to dependency.  We may have to install them again later.
# Rebuild the RPM DB using below after OS version is upgraded to 9 from 8:
# Rebuild the RPM DB using:
#:<pre>
#:<pre>
#:: sudo rpm --rebuilddb
#:: sudo rpm --rebuilddb
#:</pre>
#:</pre>
# Check if there is older kernel using:
# Optionally you can allow SHA1 based signatures via:
#:<pre>
#:<pre>
#:: rpm -qa | grep -i kernel
#:: update-crypto-policies --set DEFAULT:SHA1
#:</pre>
#:</pre>
#: If the above list contains older 4.18 kernel instead of new 5.14 kernel then old can be removed via:
#: https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
#::<pre>
# Optionally If using dnf generates warnings such as:
#::: rpm -e --nodeps  `rpm -qa|grep -i kernel|grep 4.18`
#::</pre>
# Optionally install latest 5.14 kernel using:
#:<pre>
#:: dnf -y install kernel kernel-core shim epel-release
#:</pre>
# Optionally if using dnf generates warnings such as:
#:<pre>
#:<pre>
#:: Problem 1: conflicting requests
#:: Problem 1: conflicting requests
Line 68: Line 70:
#::: dnf module disable container-tools gimp httpd llvm-toolset mariadb nginx nodejs perl perl-DBD-MySQL perl-DBI perl-libwww-perl php postgresql python27 python36 python38 python39 satellite-5-client virt perl-DBD-SQLite perl-IO-Socket-SSL
#::: dnf module disable container-tools gimp httpd llvm-toolset mariadb nginx nodejs perl perl-DBD-MySQL perl-DBI perl-libwww-perl php postgresql python27 python36 python38 python39 satellite-5-client virt perl-DBD-SQLite perl-IO-Socket-SSL
#::</pre>
#::</pre>
# Verify latest 5.14 kernel got installed properly using:
#:<pre>
#:: dnf -y install kernel kernel-core shim epel-release
#:</pre>
# Full update system once again using:
# Full update system once again using:
#:<pre>
#:<pre>
Line 73: Line 79:
#:: dnf install neofetch -y
#:: dnf install neofetch -y
#:</pre>
#:</pre>
# Reboot system and validate Rocky 9
# Reboot system and validate Rocky 9 with 5.14 kernel
# Optionally you can allow SHA1 based signatures via:
# Only if boot via 5.14 kernel is successful check and remove older kernel using:
#:<pre>
#:<pre>
#:: update-crypto-policies --set DEFAULT:SHA1
#:: dnf remove $(rpm -qa|grep -i kernel|grep 4.18)
#:</pre>
#:</pre>
#: https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
# Also install any critical packages removed earlier via dnf
# Also install any critical packages removed earlier via dnf


Line 84: Line 89:
* https://computingforgeeks.com/upgrade-to-rocky-linux-9-from-rocky-linux-8/
* https://computingforgeeks.com/upgrade-to-rocky-linux-9-from-rocky-linux-8/
* https://www.techrepublic.com/article/upgrade-rocky-linux/
* https://www.techrepublic.com/article/upgrade-rocky-linux/
 
* https://phoenixnap.com/kb/upgrade-rocky-linux-8-to-9




[[Main Page|Home]] > [[Rocky Linux or CentOS]] > [[Rocky Linux 9.x]] > [[Rocky 9.x System Administration|System Administration]] > [[Rocky 9.x Upgrade Rocky 8.x to Rocky 9.x|Upgrade Rocky 8.x to Rocky 9.x]]
[[Main Page|Home]] > [[Rocky Linux or CentOS]] > [[Rocky Linux 9.x]] > [[Rocky 9.x System Administration|System Administration]] > [[Rocky 9.x Upgrade Rocky 8.x to Rocky 9.x|Upgrade Rocky 8.x to Rocky 9.x]]

Latest revision as of 06:52, 13 April 2024

Home > Rocky Linux or CentOS > Rocky Linux 9.x > System Administration > Upgrade Rocky 8.x to Rocky 9.x

To upgrade from Rocky 8 to Rocky 9 use:

  1. Ensure sufficient free space in / before proceeding
  2. Full update current system
    dnf update -y --skip-broken --nobest --allowerasing
  3. Consider doing below till it succeeds:
    sudo dnf upgrade --refresh
    If you neeed to remove some package for above to work then after every single removal try above command again till it completes successfully.
  4. A few articles suggested doing:
    cd /etc/yum.repos.d
    rm -f CentOS* _copr* weewx.repo zmrepo*
    mv -f Rocky-PowerTools.repo.rpmnew Rocky-PowerTools.repo
  5. Go to URL https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/
  6. Note package names for rocky-release, rocky-repos and rocky-gpg-keys. Eg at time of this writing values were:
    REPO_URL="https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r"
    RELEASE_PKG="rocky-release-9.2-1.5.el9.noarch.rpm"
    REPOS_PKG="rocky-repos-9.2-1.5.el9.noarch.rpm"
    GPG_KEYS_PKG="rocky-gpg-keys-9.2-1.5.el9.noarch.rpm"
  7. Remove packages that may cause conflict:
    dnf -y remove rpmconf yum-utils epel-release
  8. Install the rocky9 packages using:
    sudo dnf install $REPO_URL/$RELEASE_PKG $REPO_URL/$REPOS_PKG $REPO_URL/$GPG_KEYS_PKG
  9. Move redhat-logos as it causes update to fail
    mv /usr/share/redhat-logos /usr/share/redhat-logos-old
  10. Upgrade system from Rocky 8 to Rocky 9 via:
    sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y
    If above throws errors then please try
    dnf remove openssl3-libs
    dnf remove python39-six
    dnf remove epel-release
    dnf remove libvpx6 iptables-ebtables
    • As a last resort you can consider running:
      sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y --skip-broken --nobest
  11. Rebuild the RPM DB using below after OS version is upgraded to 9 from 8:
    sudo rpm --rebuilddb
  12. Optionally you can allow SHA1 based signatures via:
    update-crypto-policies --set DEFAULT:SHA1
    https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9
  13. Optionally If using dnf generates warnings such as:
    Problem 1: conflicting requests
    - nothing provides module(platform:el8) needed by module container-tools:rhel8:8080020230516204140:8108cfbc.x86_64
    ...
    for many modules then list and remove modules which depend on platform:el8. For example
    dnf module list
    dnf module disable container-tools gimp httpd llvm-toolset mariadb nginx nodejs perl perl-DBD-MySQL perl-DBI perl-libwww-perl php postgresql python27 python36 python38 python39 satellite-5-client virt perl-DBD-SQLite perl-IO-Socket-SSL
  14. Verify latest 5.14 kernel got installed properly using:
    dnf -y install kernel kernel-core shim epel-release
  15. Full update system once again using:
    dnf update -y --nobest --allowerasing --skip-broken
    dnf install neofetch -y
  16. Reboot system and validate Rocky 9 with 5.14 kernel
  17. Only if boot via 5.14 kernel is successful check and remove older kernel using:
    dnf remove $(rpm -qa|grep -i kernel|grep 4.18)
  18. Also install any critical packages removed earlier via dnf

Refer:


Home > Rocky Linux or CentOS > Rocky Linux 9.x > System Administration > Upgrade Rocky 8.x to Rocky 9.x