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/04/17 19:38]
51.174.65.41 old revision restored (2022/11/12 13:32)
debian:upgradepathtemplate [2024/04/30 10:43] (current)
65.108.0.71 old revision restored (2023/02/03 13:27)
Line 16: Line 16:
 ==== 1.1. Back up any data or configuration information ==== ==== 1.1. Back up any data or configuration information ====
  
 + Sometimes you will need certain server information at your fingertips during possible failures of the server. Figure out what you may need and make sure you have it local and ready.
 ==== 1.2. Inform users in advance ==== ==== 1.2. Inform users in advance ====
  
 +=== 1.2.1 - Who and How should be informed ===
 +
 + Ensure the maintainance window you are planning is OK with all involved.
 +
 +=== 1.2.2 - Notify 1 Day prior to planned upgrade ===
 +
 +=== 1.2.3 - Notify 2 Hours prior to beginn of upgrade ===
 ==== 1.3. Prepare for downtime on services ==== ==== 1.3. Prepare for downtime on services ====
  
Line 26: Line 34:
  Verify the recoverability of system from backup image  Verify the recoverability of system from backup image
  
 + This is the perfect time to assess the Backup solution of the Company, when not previously done, if you are hired to ensure the reliability of the infrastructure.
 ==== 1.5. Prepare a safe environment for the upgrade ==== ==== 1.5. Prepare a safe environment for the upgrade ====
  
Line 72: Line 81:
  
  
-3.1. Update current installation+==== 3.1. Update current installation ==== 
   # sudo apt update   # sudo apt update
-3.2. Upgrade current installation+ 
 +==== 3.2. Upgrade current installation ==== 
 + 
 + This is where you notify everyone from Section 1.2 above prior to executing the command below. 
   # sudo apt upgrade   # sudo apt upgrade
-3.3. Check functionality+ 
 +==== 3.3. Check functionality ==== 
  Verify all services required of current host is functioning correctly  Verify all services required of current host is functioning correctly
-3.4. Upgrade current distribution+ 
 +==== 3.4. Upgrade current distribution ==== 
   # sudo apt dist-upgrade   # sudo apt dist-upgrade
-3.5. Check functionality+ 
 +==== 3.5. Check functionality ==== 
  see 3.3 above  see 3.3 above
  
Line 86: Line 106:
  
  
-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+==== 4.2. Adding APT sources for a local mirror ====
  
  Only required for special in-house software  Only required for special in-house software
  
-4.3. Adding APT sources from optical media+==== 4.3. Adding APT sources from optical media ====
  
  Only required for special 3rd party delivered software  Only required for special 3rd party delivered software
Line 102: Line 122:
  
  
-    Ensure all partition mountpoints are mounted read-write + Ensure all partition mountpoints are mounted read-write
-        # mount -o remount,rw /mountpoint+
  
-5.1. Recording the session +  # mount -o remount,rw /mountpoint 
-            # script -t 2>~/upgrade-TARGET_RELEASEstep.time -a ~/upgrade-TARGET_RELEASEstep.script + 
-         To replay session use scriptreplay +==== 5.1. Recording the session ==== 
-            # scriptreplay ~/upgrade-TARGET_RELEASE.time ~/upgrade-TARGET_RELEASE.script + 
-5.2. Updating the package list +  # script -t 2>~/upgrade-TARGET_RELEASEstep.time -a ~/upgrade-TARGET_RELEASEstep.script 
-            # apt-get update + 
-5.3. Make sure you have sufficient space for the upgrade + To replay session use scriptreplay 
-            # apt-get -o APT::Get::Trivial-Only=true dist-upgrade +  # scriptreplay ~/upgrade-TARGET_RELEASE.time ~/upgrade-TARGET_RELEASE.script 
-5.4. Minimal system upgrade + 
-            # apt-get upgrade +==== 5.2. Updating the package list ==== 
-5.5. Check functionality + 
-            See 3.3 above +  # apt-get update 
-5.6. Upgrading the system + 
-            # apt-get dist-upgrade +==== 5.3. Make sure you have sufficient space for the upgrade ==== 
-5.7. Check functionality + 
-            See 3.3 above+  # apt-get -o APT::Get::Trivial-Only=true dist-upgrade 
 + 
 +==== 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 + 
-6.2. Expected removals +  # apt-get dist-upgrade -o APT::Immediate-Configure=0 
-6.3. Conflicts or Pre-Depends loops + 
-            use -o APT::Force-LoopBreak=1 with apt-get +==== 6.2. Expected removals ==== 
-         or + 
-            # dpkg --remove package_name +==== 6.3. Conflicts or Pre-Depends loops ==== 
-        or + 
-            # apt-get -f install + use -o APT::Force-LoopBreak=1 with apt-get 
-            # dpkg --configure --pending + or 
-        or +  # dpkg --remove package_name 
-            # dpkg --install /path/to/package_name.deb + or 
-6.4. File conflicts +  # apt-get -f install 
-            # dpkg -r --force-depends package_name +  # dpkg --configure --pending 
-6.5. Configuration changes + or 
-            Usually answer "YES" to files in /etc/init.d directory or /etc/manpath.config +  # dpkg --install /path/to/package_name.deb 
-6.6. Change of session to console + 
-            Ctrl+Alt+F1 should recover the terminal window+==== 6.4. File conflicts ==== 
 + 
 +  # 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 + 
-                # dpkg -l "linux-image*" | grep ^ii | grep -i meta + Check for meta package 
-            if none are installed check which ones are available + 
-                # apt-cache search linux-image- | grep -i meta | grep -v transition +  # dpkg -l "linux-image*" | grep ^ii | grep -i meta 
-            select correct one based on value returned by running "uname -r" eg. kernel “2.6.32-5-amd64” + 
-                # apt-cache show linux-image-amd64+ 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
  
 ===== 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 + 
-            get list of removed packages + Remove redundant or obsolete packages. see 5.3 above 
-                # dpkg -l | awk '/^rc/ { print $2 }' + 
-            remove using + get list of removed packages 
-                # apt-get purge $(dpkg -l | awk '/^rc/ { print $2 }') + 
-            or use +  # dpkg -l | awk '/^rc/ { print $2 }' 
-                # aptitude search '~c' + 
-                # aptitude purge '~c'+ remove using 
 + 
 +  # 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.1713375490.txt.gz · Last modified: 2024/04/17 19:38 by 51.174.65.41