Access Manager: Upgrading Debian 9 to Debian 10 Buster

Christopher Dakin

Introduction

Debian 9's (stretch) Long Term Support (LTS) expires on June 30th 2022, so in order to take advantage of the latest updates and packages that the OS provides, we need to upgrade the OS. 

It is recommended to only upgrade one Debian release at a time so this article details upgrading your OS to Debian 10 (buster).

This article contains instructions on how to perform this upgrade from a command-line shell.

Please ensure your Access Manager instance is backed up or has a VM snapshot before performing the below.

 

Pre-requisites

  • Your Access Manager system should be on version 1.5-RG6 and the OS on Debian 9. If it is not, upgrade to this first.
  • Internet access is required to download the new operating system and Access Manager packages.
  • Access to VM console shell or direct SSH access.

 

Procedure

Note: If you are using one of our pre-built cloud VMs (AWS, Google Compute, Oracle), ensure you are running all of the below commands as the root user rather than the nervepoint user.

To do this easily, switch to root first by typing: sudo -s

 

Connect to the VMCentre shell, or via SSH with the root account. Everything in red italics are typed commands:

  1. Stop the Access Manager service with: systemctl stop nervepoint
  2. rm /etc/apt/sources.list
  3. echo "deb http://deb.debian.org/debian buster main contrib" | tee -a /etc/apt/sources.list
  4. echo "deb http://deb.debian.org/debian buster-updates main contrib" | tee -a /etc/apt/sources.list
  5. echo "deb http://deb.debian.org/debian buster-backports main contrib" | tee -a /etc/apt/sources.list
  6. echo "deb http://security.debian.org/debian-security/ buster/updates main contrib" | tee -a /etc/apt/sources.list
  7. rm /etc/apt/sources.list.d/webupd8team-java.list (this file may not exist, so any file not found error here is okay)
  8. rm /etc/apt/sources.list.d/mysql.list
  9. apt update (make sure there are no ERRORs, examine any WARNINGs).
  10. apt install mariadb-server (this will remove several mysql packages and install new mariadb-server ones).
  11. apt dist-upgradeThere could be up to 600 upgrade packages, around 100 to install, a small amount to remove, none not upgraded. Type Y to start the upgrade.  

 

The dist-upgrade can take some time. During the upgrade you may be asked some of the below questions:

  1. Console encoding (unlikely you will get prompted for this) but choose the best for your location, probably "western" for Europe/US for example.
  2. Postfix configuration (does not always get prompted)- Choose no configuration.
  3. Whether or not to allow certain services to be restarted with asking. Choose Yes by using Tab or Cursor keys and Enter.
  4. "Incompatible PAM profiles selected". Ignore it and press OK.
  5. New versions of config files are available, such as grub for example. In general its OK to 'install the package maintainer's version. Although note that if you do this with sshd_config you will not be able to SSH in as root, so you may wish to keep the local version for SSH.
  6. If you get prompted to install grub, select all devices to install grub to /dev/sda /dev/sda1, /dev/sda2 etcwith the space bar.

 

To complete the upgrade:

  1. Reboot the system by typing: reboot.
  2. Wait for at least 5 minutes for the reboot and upgrade to occur, then reconnect to the system again.
  3. Finally, tidy up any obsolete packages with: apt autoremove.
  4. You can confirm your new Debian version with the command: cat /etc/debian_version.

 

Confirm that your Access Manager service starts up and you can log in to the web UI with your admin account.

 

Note: You may see errors during the upgrade about not being able to install the linux kernel (linux-image) due to insufficient disk space.

This will not stop this upgrade from succeeding, but you may wish to fix this afterwards.

To do this, please refer to this article

then you will be able to upgrade the kernel with: apt-get dist-upgrade again.