Preparation

Upgrade time can be a daunting time specially if you are new or not that confident in performing upgrades, I will be covering the basics of upgrading which will allow you to perform an upgrade of your Debian 10 to a Debian 11 system.

The first thing that you want to do before making any changes is make sure you are familiar with the server and it's primary function, for example is it a mail server, web server database server, file server etc... this will then enable you to test it's primary function once the upgrade has completed and spot any major problems that may crop up.

You will also want to ensure that you have a backup and that you are able to restore that backup in the event that it's required. If it's a virtual machine then take a snapshot if possible. You should also consider how you will access the machine if there are problems, do you have physical access or remote access via an IPKVM/IPMI the last thing you want is for the server to go down in a remote location and you can't get onto it or boot a live cd of some sort to try and fix it.

As a general rule of thumb, the less additional or 3rd party software installed on your system, the higher chance for a successful upgrade, if you have installed any 3rd party software or manually installed software then you should check if this will upgrade with the rest of the system, in some cases you may need to remove the software prior to performing the upgrade.

Upgrade existing system

Before starting the upgrade to Debian 11 you will need to ensure that your system is fully up-to-date

apt-get update
apt-get upgrade
apt-get dist-upgrade

Checks for partially installed, missing and obsolete packages.

dpkg -C

Check what packages are held back if any.

apt-mark showhold

Before proceeding make sure you don't have any issues with packages or packages on hold.

Update Sources

The system should now be fully updated with no issues with packages so we can now update the sources.list file with the Debian Stretch sources.

Make a backup the current /etc/apt/sources.list

cp /etc/apt/sources.list /etc/apt/sources.list_backup_`date +%Y-%m-%d_%H-%M`

Edit your sources.list file and update the keyword buster to bullseye.

Buster

deb http://ftp.uk.debian.org/debian buster main
deb http://ftp.uk.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main

Bullseye

deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main

deb http://deb.debian.org/debian-security/ bullseye-security main
deb-src http://deb.debian.org/debian-security/ bullseye-security main

deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main

If you have other repos that need updating then you can do them.

Upgrading The System

When upgrading the system will prompt for user input so be aware of this so don't issue the command and run!! After the sources are updated you will need to update the packages list then start the upgrade process

apt-get update
apt-get upgrade
apt-get dist-upgrade

You should now have your system fully upgraded to Debian 11 Bullseye, reboot and then check services are working as expected.

Add a comment

0.0(0 votes)

Next Post Previous Post