Differences between revisions 1 and 20 (spanning 19 versions)
Revision 1 as of 2015-11-26 14:00:48
Size: 753
Editor: XTaran
Comment: created
Revision 20 as of 2020-12-28 06:45:35
Size: 2000
Editor: PaulWise
Comment: edit deb822 apt sources files too
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
My common steps to do a dist-upgrade to a new Debian stable release. Based on https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html My common steps to do a dist-upgrade to a new Debian stable release. Based on https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html but optimised for direct copy and paste, i.e. no italic ''step'' pseudo-variables necessary. And it of courses uses aptitude interactively to [[http://www.infodrom.org/Debian/mike.html|upgrade machines while keeping services downtimes as short as possible]].
Line 5: Line 5:
== Debian ==

=== Jessie to Stretch ===

{{{
export new=stretch
export old=jessie
}}}

=== Stretch to Buster ===

{{{
export new=buster
export old=stretch
}}}

=== Buster to Bullseye ===

{{{
export new=bullseye
export old=buster
}}}

== Devuan ==

=== Ascii to Beowulf ===

{{{
export new=beowulf
export old=ascii
}}}

== Generic ==
Line 7: Line 41:
export new=jessie
export old=wheezy
Line 27: Line 59:
= Make LVM snapshots if needed/wanted/possible =

{{{
lvcreate -L 3G -n root-${old} -s /dev/vg*/root
lvcreate -L 5G -n var-${old} -s /dev/vg*/var
lvcreate -L 1G -n log-${old} -s /dev/vg*/log
}}}

= Disable config management, etc. =

{{{
zile /etc/default/aptitude-robot
}}}
Line 30: Line 76:
sed -e "s/${old}/${new}/gi" -i /etc/apt/sources.list /etc/apt/sources.list.d/*.list sed -e "s/${old}/${new}/gi" -i /etc/apt/sources.list /etc/apt/sources.list.d/*.{list,sources}
sed -e 's:bullseye/updates:bullseye-security:g' -i /etc/apt/sources.list /etc/apt/sources.list.d/*.{list,sources}
Line 33: Line 80:

= Enable automatic package updates again =

{{{
zile /etc/default/aptitude-robot
}}}

Running this will enable the remaining disabled stuff anyways.

= Reboot =

{{{
shutdown -r now "New kernel after dist-upgrade to ${new}"
}}}

My common steps to do a dist-upgrade to a new Debian stable release. Based on https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.html but optimised for direct copy and paste, i.e. no italic step pseudo-variables necessary. And it of courses uses aptitude interactively to upgrade machines while keeping services downtimes as short as possible.

Start the session

Debian

Jessie to Stretch

export new=stretch
export old=jessie

Stretch to Buster

export new=buster
export old=stretch

Buster to Bullseye

export new=bullseye
export old=buster

Devuan

Ascii to Beowulf

export new=beowulf
export old=ascii

Generic

screen -U
script -t 2>~/upgrade-${new}.time -a ~/upgrade-${new}.script

Common Checks

dpkg --audit
dpkg --get-selections "*" > ~/curr-pkgs.${old}.txt
aptitude search "~ahold"
dpkg --get-selections | grep 'hold$'

Check if all packages are uptodate and if there are obsolete and local packages installed

aptitude -u

Make LVM snapshots if needed/wanted/possible

lvcreate -L 3G -n root-${old} -s /dev/vg*/root
lvcreate -L 5G -n var-${old} -s /dev/vg*/var
lvcreate -L 1G -n log-${old} -s /dev/vg*/log

Disable config management, etc.

zile /etc/default/aptitude-robot

Do the upgrade step by step with aptitude

sed -e "s/${old}/${new}/gi" -i /etc/apt/sources.list /etc/apt/sources.list.d/*.{list,sources}
sed -e 's:bullseye/updates:bullseye-security:g' -i /etc/apt/sources.list /etc/apt/sources.list.d/*.{list,sources}
aptitude -u

Enable automatic package updates again

zile /etc/default/aptitude-robot

Running this will enable the remaining disabled stuff anyways.

Reboot

shutdown -r now "New kernel after dist-upgrade to ${new}"