js#vista.png msort nsort
js#vista.png msort nsort
This template is meant to serve as a general upgrade path for any Debian release. This is my standard path and will be adjusted based on the “old” current release installed on the system and the target “new” release the server is being upgraded to.
I will normally create a complete system clone and use this template to work out the entire correct and functional path for the production system in question.
Debian Release upgrade paths:
Jessie -> Buster -> Bullseye Stretch -> Buster -> Bullseye Buster -> Bullseye
Ensure the maintainance window you are planning is OK with all involved.
Set maintainance window for upgrade with buffer
Verify the recoverability of system from backup image
Local terminal or SSH access
i.e.:
a. Web server delivers correctly b. php scripts execute correctly c. DB runs correctly d. mail works
find NON-Pure Debian packages # apt install aptitude apt-forktracer # aptitude search '~i(!~ODebian)' # apt-forktracer | sort
# aptitude Select GO and review
check /etc/apt/preferences & /etc/apt/preferences.d/ for entries
# dpkg --audit # aptitude search "~ahold" # dpkg --get-selections | grep 'hold$'
To remove a hold on a package:
echo package_name install | dpkg --set-selections
# sudo apt update
# sudo apt upgrade
Verify all services required of current host is functioning correctly
# sudo apt dist-upgrade
see 3.3 above
# sudo sed -i 's/CURRENT_RELEASE/TARGET_RELEASE/g' /etc/apt/sources.list # sudo sed -i 's/CURRENT_RELEASE/TARGET_RELEASE/g' /etc/apt/sources.list.d/*
Only required for special in-house software
Only required for special 3rd party delivered software
Ensure all partition mountpoints are mounted read-write
# mount -o remount,rw /mountpoint
# script -t 2>~/upgrade-TARGET_RELEASEstep.time -a ~/upgrade-TARGET_RELEASEstep.script
To replay session use scriptreplay
# scriptreplay ~/upgrade-TARGET_RELEASE.time ~/upgrade-TARGET_RELEASE.script
# apt-get update
# apt-get -o APT::Get::Trivial-Only=true dist-upgrade
# apt-get upgrade
See 3.3 above
# apt-get dist-upgrade
See 3.3 above
# apt-get dist-upgrade -o APT::Immediate-Configure=0
use -o APT::Force-LoopBreak=1 with apt-get or
# dpkg --remove package_name
or
# apt-get -f install # dpkg --configure --pending
or
# dpkg --install /path/to/package_name.deb
# dpkg -r --force-depends package_name
Usually answer “YES” to files in /etc/init.d directory or /etc/manpath.config
Ctrl+Alt+F1 should recover the terminal window
Check for meta package
# dpkg -l "linux-image*" | grep ^ii | grep -i meta
if none are installed check which ones are available
# apt-cache search linux-image- | grep -i meta | grep -v transition
select correct one based on value returned by running “uname -r” eg. kernel “2.6.32-5-amd64”
# apt-cache show linux-image-amd64
Remove redundant or obsolete packages. see 5.3 above
get list of removed packages
# dpkg -l | awk '/^rc/ { print $2 }'
remove using
# apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }')
or use
# aptitude search '~c' # aptitude purge '~c'