4.3. Procedure – Upgrading the Operating System on PNS hosts

Purpose: 

Upgrading to a new version of PNS sometimes requires upgrading the Operating System (OS) as well. OS upgrade can be peformed using Ubuntu's official upgrade tools. Although doing a clean install is more secure, this way existing configurations, logs and other files can be kept. To perform an upgrade, complete the following steps.

Prerequisites: 

  • OS can be upgraded only to the next long-term supported (LTS) Ubuntu version (e.g. from Ubuntu 22.04 LTS to 24.04 LTS)

  • Upgrade process needs to have online access to official Ubuntu repositories. PNS hosts without connection to the internet, this upgrade process is not possible, a full reinstall is needed.

  • The OS needs to have the latest official package versions installed.

  • For upgrading the PNS, access is needed to a PNS package repository, that is compatible with the upgraded OS version. This can be the PNS DVD-ROM or online apt source.

  • System Requirements of the new OS and PNS version must be fulfilled.

Steps: 

  1. Login to the host locally, or remotely using SSH. (Upgrading via SSH session is possible, but not recommended.) To do the upgrade, root permission must be granted with sudo su command.

  2. Update the current OS to latest package versions with commands: apt-get update; apt-get -y dist-upgrade. The host will download and install the new and updated packages.

  3. Install the update-manager tool: apt-get -y install update-manager-core

  4. Start the upgrade tool: do-release-upgrade and follow the on-screen instructions. During upgrade, questions may be asked about configuration file changes. In most cases, it is safe to answer the default action (keep current version). After upgrading has finished, a system reboot is requested. When the system has restarted, log in again as per first step.

    More information about running the upgrade tool can be found at: Ubuntu documentation

  5. If name resolution (DNS) was set via /etc/resolv.conf file, this setting is gone, due to reinstalling systemd-resolved. To restore name resolution, copy back original config from backed up version: cp --remove-destination /etc/.resolv.conf.systemd-resolved.bak /etc/resolv.conf

  6. PNS packages removed during the upgrade process, must be reinstalled from a source that is compatible with the new OS version. Reinstalling can be performed same way as described in Procedure 3.2, Installing PNS on a Ubuntu server

    Note

    Even if reinstall procedure uses offline DVD-ROM source, online access to official Ubuntu repositories may be needed this case, because some required base packages have been removed by upgrade process, and must be reinstalled, but DVD-ROM does not contain these.