Sub topic 15
Major release upgrades are a separate project
Assume you can use a shell, sudo, package managers, systemd, and SSH on a test server. This chapter covers moving between supported operating-system releases, such as Ubuntu 24.04 to 26.04 or RHEL 9 to RHEL 10. A release upgrade changes the system’s package repositories and many core components. It needs more planning than routine patching.
Routine patching versus a release upgrade
Routine patching updates packages within the same operating-system release. For example, Ubuntu 24.04 receives newer security fixes while remaining Ubuntu 24.04. The package manager normally handles these changes without changing the system’s release identity.
A major release upgrade changes that identity. It can replace the kernel, compiler libraries, service defaults, configuration formats, and supported application versions. Third-party repositories and locally installed software can block the upgrade or become incompatible.
| Change | Routine patching | Major release upgrade |
|---|---|---|
| Scope | Packages within one release | The operating-system release and its package set |
| Planning | Regular maintenance window | Tested project with rollback and recovery plans |
| Rollback | Sometimes possible through package history | Usually requires a snapshot, backup, or rebuild |
| Validation | Service and health checks | Full application, data, access, and monitoring tests |
Plan the upgrade before touching the server
Start by confirming that the current release and the target release are supported. Do not use a release-upgrade command to skip several unsupported versions unless the vendor explicitly documents that path. An intermediate upgrade or a fresh rebuild may be safer.
Record the server’s role, installed packages, enabled repositories, systemd services, firewall rules, mounts, scheduled jobs, application versions, and monitoring checks. Export application configuration and verify that backups can be restored. A backup that has never been tested is only an assumption.
Check whether your access method will survive a reboot. Keep console access, an out-of-band management path, or a tested recovery procedure available. Do not depend on one SSH session.
A good rollout uses a disposable clone or staging server first. Upgrade that system, run the application’s tests, and observe it for long enough to expose delayed failures. Then upgrade a low-risk production system before higher-risk systems.
flowchart TD
A[Inventory and confirm support] --> B[Back up and test recovery]
B --> C[Upgrade a clone or staging server]
C --> D{Application and health checks pass?}
D -- No --> E[Restore or rebuild and investigate]
D -- Yes --> F[Upgrade one low-risk production server]
F --> G[Verify and monitor]
G --> H[Roll out to the next group]caption: A staged major-release upgrade path alt: Flowchart from inventory and backup through staging tests, production rollout, verification, and repeated rollout
Distribution-specific upgrade paths
On Ubuntu, check whether a supported release upgrade is available before starting:
sudo apt update
sudo apt full-upgrade
sudo do-release-upgrade -cThe -c option checks for a new release without starting the upgrade. After reviewing the release notes, backup, and maintenance plan, start the interactive upgrade with sudo do-release-upgrade. Do not close the terminal or interrupt the process. For a remote system, use console access or a carefully managed recovery session.
Debian release upgrades usually require changing repository entries from the old codename to the new one, then running the documented sequence of apt update, package upgrades, and cleanup. Follow the instructions for the exact Debian versions involved. Do not copy a repository file from another server without checking vendor, architecture, and third-party compatibility.
On RHEL-family systems, the supported in-place path depends on the product and version. RHEL commonly uses Leapp:
sudo leapp preupgrade
sudo less /var/log/leapp/leapp-report.txt
sudo leapp upgradeleapp preupgrade identifies inhibitors and risks. Resolve every blocking finding before running the upgrade. For compatible clones such as Rocky Linux or AlmaLinux, use the project’s documented tool and path instead of assuming the RHEL procedure applies unchanged.
> callout warning > A major release upgrade is not a package transaction with a reliable undo button. Treat the recovery image, snapshot, or rebuild procedure as part of the upgrade itself.
Verify the result
After rebooting, confirm the release identity, kernel, failed services, mounts, network access, time synchronization, monitoring agent, logs, and application behavior. Compare the result with the inventory recorded before the change. Keep the old backup and upgrade logs until the system has passed its observation period.
Exercise
Why should apt full-upgrade or dnf upgrade be treated as routine patching rather than proof that a major release upgrade is complete?
Show answer
They normally update packages within the current release. A major upgrade changes release repositories and may require a distribution-specific migration tool, compatibility checks, recovery planning, and application testing.