BLOGROLLS

Upgrade Debian 7 to Debian 10

By: Simon Quantrill On: Wed 01 December 2021
In: sysadmin
Tags: #sysadmin

Debian Upgrade

Make a backup.

Check disk space

Installation

check for pinning /etc/apt/preferemces and preferences.d

adjust the apt sources

deb http://archive.debian.org/debian/ wheezy main
deb-src http://archive.debian.org/debian/ wheezy main

deb http://archive.debian.org/debian-security wheezy/updates main

deb http://archive.debian.org/ wheezy/updates main
deb-src http://archive.debian.org/ wheezy/updates main

# wheezy-updates, previously known as 'volatile'    
deb http://archive.debian.org/debian/ wheezy-updates main
deb-src http://archive.debian.org/debian/ wheezy-updates main

dpkg --audit 
dpkg --get-selections | grep hold


apt-get update 
apt-get -o APT::Get::Trivial-Only=true dist-upgrade
apt-get upgrade
apt-get dist-upgrade

check nothing is on hold

dpkg --audit
dpkg --get-selections | grep hold

Upgrade to Debian 8

change apt source:

deb http://ftp.debian.org/debian/ jessie main
deb-src http://ftp.debian.org/debian/ jessie main

deb http://security.debian.org/debian-security jessie/updates main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

# jessie-updates, previously known as 'volatile'
deb http://ftp.debian.org/debian/ jessie-updates main
deb-src http://ftp.debian.org/debian/ jessie-updates main

retrieve and place public package key

gpg --keyserver keyserver.ubuntu.com --recv-key AA8E81B4331F7F50
gpg -a --export AA8E81B4331F7F50 | apt-key add -

apt-get update

check if we can upgrade all packages

apt-get -u upgrade --assume-no

check space

 apt-get -o APT::Get::Trivial-Only=true dist-upgrade

We need to upgrade in two steps

apt-get upgrade
apt-get dist-upgrade
reboot

check everything works and that you are now at jessie /etc/os-release

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

check nothing is on hold

dpkg --audit
dpkg --get-selections | grep hold

Debian9

%s/jessie/stretch/g on apt sources

apt-get update

Add all the missing public keysL

 gpg --keyserver keyserver.ubuntu.com --recv-key ???????????????
    gpg -a --export ??????????? | apt-key add -

 apt-get update

check space

    apt-get -o APT::Get::Trivial-Only=true dist-upgrade

apt-get upgrade
reboot

cat /etc/os-release

We should now be at stretch or debian 9

*9 introduced new network interfaces so check that the interfaces files has changed and no interfaces switched Change where needed to new naming convention *** Perl changes may break clamd and spamassasian

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

check nothing is on hold

dpkg --audit
dpkg --get-selections | grep hold

Debian 10

 %s/stretch/buster/g on apt sources

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

 cat /etc/os-release

We should now be at buster or debian 10

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

check nothing is on hold

dpkg --audit
dpkg --get-selections | grep hold

if you get this:

#Determining Hosts in Zones...
#Locating Action Files...
#   ERROR: Unknown Action (Drop) in DROP_DEFAULT setting /usr/share/shorewall/actions.std (EOF)

cd /etc/shorewall

and

cd /etc/shorewall6

then change in both:

ACCEPT_DEFAULT=none
DROP_DEFAULT=Drop
NFQUEUE_DEFAULT=none
QUEUE_DEFAULT=none
REJECT_DEFAULT=Reject

with this one

ACCEPT_DEFAULT="none"
BLACKLIST_DEFAULT="dropBcasts,dropNotSyn,dropInvalid"
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
NFQUEUE_DEFAULT="none"
QUEUE_DEFAULT="none"
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"

in shorewall.conf

===


If you found the article helpful, please share or cite the article, and spread the word:


For any feedback or corrections, please write in to: Simon Quantrill