Access Manager: Upgrading Debian 10 to Debian 11 Bullseye

Christopher Dakin

Introduction

Debian 10's (buster) will soon go from standard support to Long Term Support (LTS) somewhere around August 2022.

The Long Term Support itself should last until mid 2024 so there is no requirement to upgrade the OS yet to this version as you will still get security patches.

However, the current version of Debian is 11 (Bullseye), so if you wish to upgrade to the current OS, then this article will show you how to do this, as Access Manager has been tested to work on this release.

 

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

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 10. 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 bullseye main" | tee -a /etc/apt/sources.list
  4. echo "deb http://deb.debian.org/debian-security/ bullseye-security main" | tee -a /etc/apt/sources.list
  5. echo "deb http://deb.debian.org/debian bullseye-updates main" | tee -a /etc/apt/sources.list
  6. apt update (make sure there are no ERRORs, examine any WARNINGs).
  7. apt dist-upgradeThere could be up to 700 upgrade packages, around 150 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.
  5. Debian 11 reports its memory differently which breaks a config file which we can fix by commenting a line out with:
    sed -i 's/actual_memory=\$(dmi/#actual_memory=\$(dmi/' /sbin/nervepoint-hardware-detect
  6. Restart the service with systemctl restart nervepoint.

 

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 dist-upgrade again.