Introduction
Debian 9 Stretch is still in long term support (LTS) until June 2022, but if you have an older LogonBox install, it is possible to upgrade the OS to a later version to bring the OS inline with our current new VM images.
It is recommended to upgrade one OS step at a time, so this article contains instructions on how to perform this upgrade from Debian 9 to Debian 10 via a command-line shell.
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
thenapt 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:
- 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
rm /etc/apt/sources.list
echo "deb http://deb.debian.org/debian/ buster main contrib non-free" | tee -a /etc/apt/sources.list
echo "deb http://security.debian.org/ buster/updates main contrib non-free" | tee -a /etc/apt/sources.list
echo "deb http://deb.debian.org/debian/ buster-updates main contrib non-free" | tee -a /etc/apt/sources.list
echo "deb http://deb.debian.org/debian/ buster-backports main contrib non-free" | tee -a /etc/apt/sources.list
rm /etc/apt/sources.list.d/hypersocketdebianstable.list
rm /etc/apt/sources.list.d/hypersocketdebianea.list
(this file may not exist, just continue).echo "deb http://hypersocketdebianstable.s3.amazonaws.com tachyon main" > /etc/apt/sources.list.d/hypersocketdebianstable.list
echo "#deb http://hypersocketdebianea.s3.amazonaws.com tachyon main" > /etc/apt/sources.list.d/hypersocketdebianea.list
apt update
(make sure there are no ERRORs, examine any WARNINGs. Any Error on stretch-updates/main Translation-en is okay).apt install ca-certificates
.apt upgrade
(There could be up to 400 upgrade packages, and around 100 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:
- Configuring keyboard-configuration, choose the keyboard layout most suitable for you.
- Restart services during package upgrades without asking. Choose Yes.
- 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 sshd_config.
- 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:
Errors were encountered while processing:
ca-certificates
ca-certificates-java
hypersocket-vm
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
then simply run apt upgrade
again.
To complete the upgrade:
apt dist-upgrade
(this will upgrade and install a few more packages, if you get any errors as per above, run the dist-upgrade again).- Reboot the system by typing:
reboot
. - Wait a few minutes for the reboot to occur, then reconnect to the system's terminal again.
- You can now confirm the debian version with:
cat /etc/debian_version
- Finally, run
apt autoremove
to remove any packages that are no longer required.
You should now have a working LogonBox system running on Debian 10 (buster).