Upgrading from Debian 10 to 11

Christopher Dakin

Introduction

If you wish to upgrade a LogonBox VM to the latest version of Debian, this article contains instructions on how to perform this upgrade from Debian 10 to Debian 11 via a command-line shell.

If you are wanting to upgrade from a version prior to Debian 9, it is recommended you stage the upgrade via Debian 10 first.

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

Note that this upgrade will also upgrade LogonBox to version 2.3 if you were on an older version.

 

Pre-requisites

  • You must run apt update then apt upgrade to ensure that you have all of the latest packages for Debian 9 before the upgrade.
  • Internet access required to download the new operating system.
  • Access to the 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 are typed commands:

  1. Stop the LogonBox service. The command to run depends on the product you have.
    For LogonBox SSPR: systemctl stop hypersocket-idm
    For LogonBox VPN: systemctl stop logonbox-wireguard
  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. rm /etc/apt/sources.list.d/hypersocketdebianstable.list
  7. rm /etc/apt/sources.list.d/hypersocketdebianea.list (this file may not exist, just continue).
  8. apt update (make sure there are no ERRORs, examine any WARNINGs. Any Error on stretch-updates/main Translation-en is okay).
  9. apt install ncal (accept default prompts to install)
  10. apt install openssh-server (keep the local version of the config file when prompted)
  11. apt install libnss3
  12. apt install ca-certificates (installing these last 4 packages now prevents some errors on the main upgrade).
  13. Note: If you want to also upgrade your LogonBox server to version 2.4 at the same time, please run optional steps 14 and 15.
  14.   echo "deb http://hypersocketdebianstable.s3.amazonaws.com umbra main" > /etc/apt/sources.list.d/hypersocketdebianstable.list
  15.   echo "#deb http://hypersocketdebianea.s3.amazonaws.com umbra main" > /etc/apt/sources.list.d/hypersocketdebianea.list
  16. apt upgrade (There could be up to 450 upgrade packages, and around 60 newly installed. Type Y to start the upgrade).

 

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

  1. Configuring keyboard-configuration, choose the keyboard layout most suitable for you.
  2. Restart services during package upgrades without asking. Choose Yes.
  3. New versions of config files are available, such as grub for example. In general its OK to 'install the package maintainer's version.
  4. If you get prompted to configure grub-pc, select all devices to install grub to /dev/sda /dev/sda1, /dev/sda2 etc with the space bar. Note if you get an error saying that grub couldn't install, you may need to merge the boot partition

 

If you get any messages such as the following after the apt upgrade

Errors were encountered while processing:
Errors were encountered while processing:
hypersocket-vm
hypersocket-vm
hypersocket-vm
hypersocket-vm
hypersocket-vm
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

then run dpkg --configure -a followed by apt --fix-broken install then apt upgrade again.

 

To complete the upgrade:

  1. apt full-upgrade (this will upgrade and install a few more packages, if you get any errors as per above, run the dist-upgrade again).
  2. apt install mariadb-server (this will change mysql to mariadb if the system wasn't already using this database).
  3. The last step removed the LogonBox service, so now reinstall it:
    For LogonBox SSPR: apt install hypersocket-idm
    For LogonBox VPN: apt install logonbox-wireguard
  4. Wait a couple of minutes for the LogonBox service to start up, then reboot the system by typing: reboot
  5. Reconnect to the system's terminal again after the reboot and confirm the debian version with: cat /etc/debian_version.
  6. Finally, run apt autoremove to remove any packages that are no longer required.

You should now have a working LogonBox system running on Debian 11 (bullseye).