Sub topic 10
Compatibility, Major Upgrades, and Switching Distributions
This chapter assumes that you can use a Linux shell, install packages, manage systemd services, and understand basic firewall and permission concepts. The focus is how distribution choices affect upgrades, application compatibility, and migration work.
Compatibility Has Several Layers
Two distributions can run the same application while still requiring different administration work. Check compatibility at each layer:
- CPU and kernel: The processor architecture must be supported. Applications may also depend on kernel features, device drivers, or security modules.
- System libraries: Compiled programs often depend on libraries such as
glibc, OpenSSL, or the C++ runtime. A newer library is usually compatible, but not always. - Package format: Debian-family systems use
.debpackages anddpkg; Rocky Linux uses.rpmpackages andrpm. Do not install a package built for the other family. - Service layout: Configuration files, service names, users, and file paths can differ even when both systems use
systemd. - Security policy: AppArmor and SELinux can block an application that works with ordinary Unix permissions.
- Vendor support: A vendor may support a product only on specific Ubuntu, Debian, or RHEL-compatible releases.
A container can reduce some host differences, but it does not remove every dependency. The host kernel, storage, networking, security policy, and container runtime still matter.
| Compatibility question | What to check |
|---|---|
| Can the application run? | Supported CPU, kernel, libraries, and runtime versions |
| Can it be installed? | Package format, repository, dependencies, and vendor instructions |
| Can it be operated? | Service units, logs, paths, users, firewall, and security policy |
| Can it be supported? | Vendor certification and the distribution's support lifecycle |
Major Release Upgrades
A major release upgrade changes a supported set of packages and system behavior. It is different from routine updates, which normally fix bugs and security problems within one release.
Before upgrading, record the current state:
. /etc/os-release
printf 'System: %s %s\n' "$NAME" "$VERSION_ID"
uname -r
systemctl list-unit-files --state=enabled
dpkg-query -W 2>/dev/null | sort > /tmp/packages-deb.txt || \
rpm -qa 2>/dev/null | sort > /tmp/packages-rpm.txtAlso identify application data, configuration files, scheduled jobs, locally installed packages, kernel modules, and external repositories. Test a restorable backup. A backup that has never been restored is only an assumption.
Ubuntu provides a documented release-upgrade workflow, commonly started with do-release-upgrade. Debian upgrades use the release notes and a carefully controlled apt process. Rocky Linux upgrades must follow the documented path for the exact source and target releases. An in-place tool may exist for a particular transition, but it should not be assumed to work for every version pair.
Common upgrade risks include:
- A third-party repository has no packages for the target release.
- A configuration file contains an obsolete option.
- A package is removed or renamed.
- A database version requires a separate migration.
- A kernel module or monitoring agent is not compatible.
- A security policy becomes stricter.
- A reboot is required, but the application cannot tolerate downtime.
Use a staging server or a recent clone to rehearse the process. Define a rollback plan before starting. For a virtual machine, a tested image or snapshot can help, but a snapshot is not a substitute for an independent backup.
Switching Distributions
Switching from Ubuntu or Debian to Rocky Linux, or in the opposite direction, is usually a migration rather than an upgrade. The package database, repositories, default policies, and many configuration conventions change. An in-place conversion can leave a mixed system that is difficult to support.
A safer pattern is to build a new server:
- Choose and install the target distribution.
- Apply updates and baseline security settings.
- Install the application from the target distribution's supported repository or vendor package.
- Recreate users, service accounts, firewall rules, scheduled jobs, and monitoring.
- Transfer application data through a documented export and import process.
- Test the application and record the results.
- Move traffic using DNS, a load balancer, or another controlled cutover.
- Keep the old server available until the rollback period ends.
Decision Rules
Keep the same distribution when the workload depends on vendor certification, specialized kernel modules, or tightly controlled package versions. Consider a new distribution when the current release is nearing end of support, required software is unavailable, or the team has a clear operational reason to change.
For a migration, compare the total cost of rebuilding, testing, transferring data, retraining administrators, and updating automation. The cheapest package command is rarely the main cost.
Exercise
Why is moving from Ubuntu to Rocky Linux normally treated as a migration instead of a major upgrade?
Show answer
The package format, repositories, security policy, configuration conventions, and supported software sets change. Building and testing a new server gives a cleaner rollback path than converting the existing installation.