User Tools

Site Tools


debian:upgradepathtemplate

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
debian:upgradepathtemplate [2024/05/08 20:18]
84.247.135.134 old revision restored (2023/02/04 15:28)
debian:upgradepathtemplate [2024/05/20 00:56] (current)
178.150.14.250 old revision restored (2023/02/05 02:59)
Line 4: Line 4:
  
 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. 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 
  
 ===== 1. Preparing for the upgrade ===== ===== 1. Preparing for the upgrade =====
Line 20: Line 14:
 ==== 1.3. Prepare for downtime on services ==== ==== 1.3. Prepare for downtime on services ====
  
- Set maintainance window for upgrade with buffer+  Set maintainance window for upgrade with buffer
  
 ==== 1.4. Prepare for recovery ==== ==== 1.4. Prepare for recovery ====
  
- Verify the recoverability of system from backup image+            Verify the recoverability of system from backup image
  
 ==== 1.5. Prepare a safe environment for the upgrade ==== ==== 1.5. Prepare a safe environment for the upgrade ====
  
- Local terminal or SSH access+            Local terminal or SSH access
  
 ==== 1.6. Develop tests for section 3.3 that will ensure correct execution of needed tasks ==== ==== 1.6. Develop tests for section 3.3 that will ensure correct execution of needed tasks ====
  
- i.e.: +            i.e.: 
-  a. Web server delivers correctly +                a. Web server delivers correctly 
-  b. php scripts execute correctly +                b. php scripts execute correctly 
-  c. DB runs correctly +                c. DB runs correctly 
-  d. mail works+                d. mail works
  
 ===== 2. Checking system status ===== ===== 2. Checking system status =====
Line 48: Line 42:
 ==== 2.1. Review actions pending in package manager ==== ==== 2.1. Review actions pending in package manager ====
  
-    # aptitude +            # aptitude 
-  Select GO and review+            Select GO and review
  
 ==== 2.2. Disabling APT pinning ==== ==== 2.2. Disabling APT pinning ====
  
- check /etc/apt/preferences & /etc/apt/preferences.d/ for entries +            check /etc/apt/preferences & /etc/apt/preferences.d/ for entries
 ==== 2.3. Checking packages status ==== ==== 2.3. Checking packages status ====
  
-  # dpkg --audit +            # dpkg --audit 
-  # aptitude search "~ahold" +            # aptitude search "~ahold" 
-  # dpkg --get-selections | grep 'hold$' +            # dpkg --get-selections | grep 'hold$'
- +
- To remove a hold on a package: +
-  echo package_name install | dpkg --set-selections+
  
 +         To remove a hold on a package: echo package_name install | dpkg --set-selections
 ==== 2.4. Remove proposed-updates section if present in /etc/apt/sources.list ==== ==== 2.4. Remove proposed-updates section if present in /etc/apt/sources.list ====
  
Line 72: Line 63:
  
  
-==== 3.1. Update current installation ==== +3.1. Update current installation 
- +            # sudo apt update 
-  # sudo apt update +3.2. Upgrade current installation 
- +            # sudo apt upgrade 
-==== 3.2. Upgrade current installation ==== +3.3. Check functionality 
- +            Verify all services required of current host is functioning correctly 
-  # sudo apt upgrade +3.4. Upgrade current distribution 
- +            # sudo apt dist-upgrade 
-==== 3.3. Check functionality ==== +3.5. Check functionality 
- +            see 3.3 above
- Verify all services required of current host is functioning correctly +
- +
-==== 3.4. Upgrade current distribution ==== +
- +
-  # sudo apt dist-upgrade +
- +
-==== 3.5. Check functionality ==== +
- +
- see 3.3 above+
  
 ===== 4. Preparing sources for APT ===== ===== 4. Preparing sources for APT =====
  
  
-==== 4.1. Adding APT Internet sources ==== +4.1. Adding APT Internet sources 
- +            # 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 +            # sudo sed -i 's/CURRENT_RELEASE/TARGET_RELEASE/g' /etc/apt/sources.list.d/
-  # sudo sed -i 's/CURRENT_RELEASE/TARGET_RELEASE/g' /etc/apt/sources.list.d/+4.2. Adding APT sources for a local mirror 
- +            Only required for special in-house software 
-==== 4.2. Adding APT sources for a local mirror ==== +4.3. Adding APT sources from optical media 
- +            Only required for special 3rd party delivered software
- Only required for special in-house software +
- +
-==== 4.3. Adding APT sources from optical media ==== +
- +
- Only required for special 3rd party delivered software+
  
 ===== 5. Upgrading packages ===== ===== 5. Upgrading packages =====
  
  
- Ensure all partition mountpoints are mounted read-write+    Ensure all partition mountpoints are mounted read-write 
 +        # mount -o remount,rw /mountpoint
  
-  # mount -o remount,rw /mountpoint +5.1. Recording the session 
- +            # script -t 2>~/upgrade-TARGET_RELEASEstep.time -a ~/upgrade-TARGET_RELEASEstep.script 
-==== 5.1. Recording the session ==== +         To replay session use scriptreplay 
- +            # scriptreplay ~/upgrade-TARGET_RELEASE.time ~/upgrade-TARGET_RELEASE.script 
-  # script -t 2>~/upgrade-TARGET_RELEASEstep.time -a ~/upgrade-TARGET_RELEASEstep.script +5.2. Updating the package list 
- +            # apt-get update 
- To replay session use scriptreplay +5.3. Make sure you have sufficient space for the upgrade 
-  # scriptreplay ~/upgrade-TARGET_RELEASE.time ~/upgrade-TARGET_RELEASE.script +            # apt-get -o APT::Get::Trivial-Only=true dist-upgrade 
- +5.4. Minimal system upgrade 
-==== 5.2. Updating the package list ==== +            # apt-get upgrade 
- +5.5. Check functionality 
-  # apt-get update +            See 3.3 above 
- +5.6. Upgrading the system 
-==== 5.3. Make sure you have sufficient space for the upgrade ==== +            # apt-get dist-upgrade 
- +5.7. Check functionality 
-  # apt-get -o APT::Get::Trivial-Only=true dist-upgrade +            See 3.3 above
- +
-==== 5.4. Minimal system upgrade ==== +
- +
-  # apt-get upgrade +
- +
-==== 5.5. Check functionality ==== +
- +
- See 3.3 above +
- +
-==== 5.6. Upgrading the system ==== +
- +
-  # apt-get dist-upgrade +
- +
-==== 5.7. Check functionality ==== +
- +
- See 3.3 above+
  
 ===== 6. Possible issues during upgrade ===== ===== 6. Possible issues during upgrade =====
  
  
-==== 6.1. Dist-upgrade fails with “Could not perform immediate configuration” ==== +6.1. Dist-upgrade fails with “Could not perform immediate configuration” 
- +            # apt-get dist-upgrade -o APT::Immediate-Configure=0 
-  # apt-get dist-upgrade -o APT::Immediate-Configure=0 +6.2. Expected removals 
- +6.3. Conflicts or Pre-Depends loops 
-==== 6.2. Expected removals ==== +            use -o APT::Force-LoopBreak=1 with apt-get 
- +         or 
-==== 6.3. Conflicts or Pre-Depends loops ==== +            # dpkg --remove package_name 
- +        or 
- use -o APT::Force-LoopBreak=1 with apt-get +            # apt-get -f install 
- or +            # dpkg --configure --pending 
-  # dpkg --remove package_name +        or 
- or +            # dpkg --install /path/to/package_name.deb 
-  # apt-get -f install +6.4. File conflicts 
-  # dpkg --configure --pending +            # dpkg -r --force-depends package_name 
- or +6.5. Configuration changes 
-  # dpkg --install /path/to/package_name.deb +            Usually answer "YES" to files in /etc/init.d directory or /etc/manpath.config 
- +6.6. Change of session to console 
-==== 6.4. File conflicts ==== +            Ctrl+Alt+F1 should recover the terminal window
- +
-  # dpkg -r --force-depends package_name +
- +
-==== 6.5. Configuration changes ==== +
- +
- Usually answer "YES" to files in /etc/init.d directory or /etc/manpath.config +
- +
-==== 6.6. Change of session to console ==== +
- +
- Ctrl+Alt+F1 should recover the terminal window+
  
 ===== 7. Upgrading kernel and related packages ===== ===== 7. Upgrading kernel and related packages =====
  
  
-==== 7.1. Install any needed kernel metapackage ==== +7.1. Install any needed kernel metapackage 
- +            Check for meta package 
- Check for meta package +                # dpkg -l "linux-image*" | grep ^ii | grep -i meta 
- +            if none are installed check which ones are available 
-  # dpkg -l "linux-image*" | grep ^ii | grep -i meta +                # 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” 
- if none are installed check which ones are available +                # apt-cache show linux-image-amd64
- +
-  # 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+
  
 ===== 8. Preparing for the next release ===== ===== 8. Preparing for the next release =====
  
  
-==== 8.1. Purging removed packages ==== +8.1. Purging removed packages 
- +            Remove redundant or obsolete packages. see 5.3 above 
- Remove redundant or obsolete packages. see 5.3 above +            get list of removed packages 
- +                # dpkg -l | awk '/^rc/ { print $2 }' 
- get list of removed packages +            remove using 
- +                # apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }') 
-  # dpkg -l | awk '/^rc/ { print $2 }' +            or use 
- +                # aptitude search '~c' 
- remove using +                # aptitude purge '~c'
- +
-  # apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }') +
- +
- or use +
- +
-  # aptitude search '~c' +
-  # aptitude purge '~c'+
  
 ===== 9. Obsolete packages ===== ===== 9. Obsolete packages =====
  
  
-==== 9.1. Dummy packages ==== +9.1. Dummy packages
debian/upgradepathtemplate.1715192333.txt.gz · Last modified: 2024/05/08 20:18 by 84.247.135.134