The Rocky Project was started by Gregory Kurtzer, the original founder of CentOS. This was after the announcement of the death of CentOS Linux by Redhat. This Linux distribution developed to achieve the original goals of CentOS was first released on April 30, 2021, and the general availability version was released on June 21, 2021.
The most amazing thing is that Rocky Linux is free and open-source, 100% bug-for-bug Red Hat Enterprise Linux compatible distribution. The latest release version for this Linux distribution is Rocky Linux 9. This release version, which is in line with RHEL 9 was publicly made available on July 14, 2022. It comes with several amazing features and improvements that include:
- System monitoring: It has an updated Cockpit web console with metrics to help identify the CPU, memory, disk, and network use.
- New versions of the following for programming:
- Python 3.9 which will be will be supported for the entire lifecycle of Rocky Linux 9
- Node.js 16 which includes an upgrade to the V8 engine to version 9.2, a new Timer Promises API, a new web streams API, and support for npm package manager version 7.20.3.
- Ruby 3.0.3 provides several performance improvements, along with bug and security fixes.
- Perl 5.32 with bug fixes and enhancements, including Unicode version 13.
- PHP 8.0 with bug fixes and enhancements, including the use of structured metadata syntax, newly named arguments that are order-independent, and improved performance for Just-In-Time compilation.
- Database Servers provided are:
- MariaDB 10.5
- PostgreSQL 13
- Redis 6.2
- MySQL 8.0
- File system: On Rocky Linux 9, XFS supports Direct Access (DAX) which permits direct access to byte-addressable persistent memory. This helps reduce the latency encountered in traditional block I/O conventions.
- New Desktop: Rocky Linux 9 ships GNOME 40 as the default desktop environment. It has redesigned core application and UI that makes it simple and easier to use. The new look and feel provide a totally different experience when working, launching apps, and arranging workspaces.
- The following compilers and development tools have been added:
- GCC 11.2.1
- binutils 2.35.2
- glibc 2.34
- Compiler toolsets that include Go Toolset 1.17.7, LLVM Toolset 13.0.1, Rust Toolset 1.58.1 e.t.c
The main aim of this guide is to demonstrate how to upgrade to Rocky Linux 9 from Rocky Linux 8.
Upgrade Requirements
Rocky Linux 9 is supported on the following architectures:
- AMD and Intel 64-bit architectures (x86-64-v2)
- The 64-bit ARM architecture (ARMv8.0-A)
- IBM Power Systems, Little Endian (POWER9)
- 64-bit IBM Z (z14)
For this guide, you need the following:
- A working Rocky Linux 8 system.
- Internet connection
- Free space of about 100MB on the boot partition
Disclaimer: This is not an officially supported method for migrating production Rocky Linux 8 servers to Rocky Linux 9. Don’t run the commands shared in production servers unless you’re sure of what you’re doing. Refer to installation guide for new OS installation and applications migration:
1. Prepare the Rocky Linux 8 Server
Begin by updating the system and all the available packages to their latest available versions.
sudo dnf update -y
Check the current OS and version available on the system.
$ cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.6 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
You may also need to take a backup of the important system configurations. There are several tools you can use for this. They include:
- Rsync– a command line utility tool used to backup personal and $ Home directory data
- Deja Dup– a GUI utility used to back up personal data.
- Timeshift– a tool used to backup system files and configurations.
- Restic– a command line utility tool that saves multiple revisions of files in an encrypted repository stored on different backends.
- Rsnapshot– this is a command line utility tool that creates periodic snapshots for local and remote machines over ssh.
- Bacula – a set of programs used to manage backup, restoration, and verification of data over a network. More information is captured in the guide on how to Install and Use Bacula Backup on Rocky Linux 8|AlmaLinux 8
Once a system backup has been taken, proceed as shown.
2. Add Rocky Linux 9 Repositories
Begin by adding the Rocky Linux 9 repositories and key-signing to your system. See latest packages releases in official repo web path.
REPO_URL="https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r"
RELEASE_PKG="rocky-release-9.0-2.4.el9.noarch.rpm"
REPOS_PKG="rocky-repos-9.0-2.4.el9.noarch.rpm"
GPG_KEYS_PKG="rocky-gpg-keys-9.0-2.4.el9.noarch.rpm"
The command used for this is:
sudo dnf --nogpgcheck -y install $REPO_URL/$RELEASE_PKG $REPO_URL/$REPOS_PKG $REPO_URL/$GPG_KEYS_PKG
3. Install Required Rocky Linux 9 Packages
Form the added repositories, and install all the required packages for Rocky Linux 9. But first, switch to the root
user and remove the below packages:
sudo su -
dnf -y remove rpmconf yum-utils epel-release
Also, you need to delete the redhat-logos
which is not required here:
rm -rf /usr/share/redhat-logos
Now install all the required packages for Rocky Linux 9
dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync
This process might take some time since many packages need to be installed/upgraded. Once complete, proceed as below.
4. Update the Rocky Linux Kernel
You need to uninstall the old kernel and also check whether the latest kernel has been installed. The command used here is:
rpm -qa | grep kernel
Sample Output:
warning: Found bdb_ro Packages database while attempting sqlite backend: using bdb_ro backend.
kernel-core-4.18.0-372.16.1.el8_6.0.1.x86_64
kernel-modules-4.18.0-372.9.1.el8.x86_64
kernel-tools-libs-5.14.0-70.17.1.el9_0.x86_64
kernel-core-5.14.0-70.17.1.el9_0.x86_64
kernel-modules-4.18.0-372.16.1.el8_6.0.1.x86_64
kernel-modules-5.14.0-70.17.1.el9_0.x86_64
kernel-tools-5.14.0-70.17.1.el9_0.x86_64
kernel-5.14.0-70.17.1.el9_0.x86_64
kernel-4.18.0-372.16.1.el8_6.0.1.x86_64
kernel-core-4.18.0-372.9.1.el8.x86_64
kernel-4.18.0-372.9.1.el8.x86_64
From the above output, we have a warning that requires us to rebuild the RPM repository:
cd /var/lib/rpm
rm -f __db.00*
rpm --rebuilddb
Now remove the older kernel 4.18.* in the output by running the command below
rpm -e --nodeps `rpm -qa|grep -i kernel|grep 4.18`
If you re-run the command to check the kernel, kernel 4.18 should be removed:
$ rpm -qa | grep kernel
kernel-tools-libs-5.14.0-70.17.1.el9_0.x86_64
kernel-core-5.14.0-70.17.1.el9_0.x86_64
kernel-modules-5.14.0-70.17.1.el9_0.x86_64
kernel-tools-5.14.0-70.17.1.el9_0.x86_64
kernel-5.14.0-70.17.1.el9_0.x86_64
If there is no 5.x kernel on your system, install it using the command:
dnf -y install kernel kernel-core shim
Sample Output:
Dependencies resolved.
===================================================================================
Package Architecture Version Repository Size
===================================================================================
Installing:
shim-x64 x86_64 15.4-2.el9.rocky.1 baseos 669 k
Installing dependencies:
efi-filesystem noarch 6-2.el9_0 baseos 7.7 k
mokutil x86_64 2:0.4.0-8.el9_0.1 baseos 44 k
Transaction Summary
===================================================================================
Install 3 Packages
Total download size: 721 k
From the above output, we have errors from certain modules, list the enabled modules:
# dnf module list
........
Name Stream Profiles Summary
container-tools rhel8 [e] common Most recent (rolling) versions of podman, bui
ldah, skopeo, runc, conmon, runc, conmon, CRI
U, Udica, etc as well as dependencies such as
container-selinux built and tested together,
and updated as frequently as every 12 weeks.
llvm-toolset rhel8 [e] common LLVM
perl 5.26 [e] common, Practical Extraction and Report Language
minimal
perl-DBD-SQLite 1.58 [e] common SQLite DBI driver
perl-DBI 1.641 [e] common A database access API for Perl
perl-IO-Socket-SSL 2.066 [e] common Perl library for transparent TLS
perl-libwww-perl 6.34 [e] common A Perl interface to the World-Wide Web
python36 3.6 [e] build, c Python programming language, version 3.6
ommon
virt rhel [e] common Virtualization module
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Disable them with the command:
dnf module disable perl container-tools llvm-toolset virt perl-IO-Socket-SSL perl-libwww-perl python36 perl-DBI perl-DBD-SQLite
Sample Output:
Dependencies resolved.
===================================================================================
Package Architecture Version Repository Size
===================================================================================
Disabling modules:
container-tools
llvm-toolset
perl
perl-DBD-SQLite
perl-DBI
perl-IO-Socket-SSL
perl-libwww-perl
python36
virt
Transaction Summary
===================================================================================
Is this ok [y/N]: y
5. Update and Reboot the System
At this point, there is no much to update on the system since all the packages are up-to-date. To update any packages, run the command:
dnf update -y
Reboot the system.
reboot
The system will boot into Rocky Linux 9 as shown.
6. Post Upgrade Rocky Linux 9 Activities.
Once the system reboots, log in using the system user.
Rocky Linux 9 will start with the below window that requires you to take a tour and familiarize yourself with Rocky Linux 9.
The amazing Gnome 40 desktop environment will be launched as shown:
To verify the installation, proceed to Settings->About
Alternatively, you can install and use neofecth
as shown:
sudo yum install epel-release -y
sudo dnf install neofetch -y
Check the Rocky Linux version.
Now you can update your system using the command:
sudo dnf update -y
Install any preferred tool. For example the vim
text editor
sudo dnf install vim
After verifying that everything is working as desired, you can restore the backup made earlier.
The end!
I hope this guide on how to upgrade to Rocky Linux 9 from Rocky Linux 8 was significant to you. Check other Rocky Linux guides available on our website to help your in becoming a super Administrator.
Similar guides on OS upgrades;
How to upgrade to Fedora 36 from Fedora 35
Upgrade Kali Linux 2021.x to Kali Linux 2022.x
Upgrade from Debian 10 (Buster) To Debian 11 (Bullseye)
How To Upgrade from Ubuntu 20.04 To Ubuntu 22.04