Last active
July 22, 2024 13:53
-
-
Save rrottmann/b0f371a62950a9e149c4358772c5a647 to your computer and use it in GitHub Desktop.
Dist-Upgrade Debian 10 Buster to Debian 12 Bookworm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Debian 10 | |
apt-get -y update | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
cat > /etc/apt/sources.list <<"EOF" | |
deb http://deb.debian.org/debian/ bullseye main | |
deb-src http://deb.debian.org/debian/ bullseye main | |
deb http://security.debian.org/bullseye-security bullseye-security/updates main | |
deb-src http://security.debian.org/bullseye-security bullseye-security/updates main | |
deb http://deb.debian.org/debian/ bullseye-updates main | |
deb-src http://deb.debian.org/debian/ bullseye-updates main | |
EOF | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 605C66F00D6C9793 6ED0E7B82643E131 0E98404D386FA1D9 | |
apt-get clean | |
apt-get -y update | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
shutdown -r now | |
# Debian 11 | |
cat > /etc/apt/sources.list <<"EOF" | |
deb http://deb.debian.org/debian/ bookworm main | |
deb-src http://deb.debian.org/debian/ bookworm main | |
deb http://security.debian.org/bookworm-security bookworm-security/updates main | |
deb-src http://security.debian.org/bookworm-security bookworm-security/updates main | |
deb http://deb.debian.org/debian/ bookworm-updates main | |
deb-src http://deb.debian.org/debian/ bookworm-updates main | |
EOF | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BDE6D2B9216EC7A8 | |
apt-get clean | |
apt-get -y update | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
# issue with libcrypt.so.1 | |
cd /tmp | |
apt -y download libcrypt1 | |
dpkg-deb -x libcrypt1_1*a4.4.25-2_amd64.deb . | |
cp -av lib/x86_64-linux-gnu/* /lib/x86_64-linux-gnu/ | |
apt -y --fix-broken install | |
apt-get -y upgrade --without-new-pkgs | |
apt-get -y full-upgrade | |
apt-get -y auto-remove | |
shutdown -r now |
Can confirm that the upgrades run flawlessly when using the respective bullseye-security
and bookworm-security
instead of stable-security
.
Both libcrypt and keyserver tricks are not needed with the correct security repo links.
Thanks for the gist tho !
When my provider notified me of an irreparable RAID error on a root server, I had to reinstall it using an outdated provider image. This gave me an opportunity to test the script and implement the changes, though I still needed the libcrypt1 fix.
Okay, interesting. I guess it's a regular case of YMMV.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BDE6D2B9216EC7A8
is likely also unnecessary if not using mismatched repos during upgrade, e.g.stable-security
with bullseye whenstable-security
is pointing at bookworm.