Debian 11 to 12 » History » Version 2
Hannah Siwiec, 01/25/2024 04:31 PM
1 | 1 | Hannah Siwiec | h1. Debian 11 to 12 |
---|---|---|---|
2 | |||
3 | 2 | Hannah Siwiec | Pre update check |
4 | Edit this section |
||
5 | Stretch check |
||
6 | |||
7 | Check if any sources still point to stretch |
||
8 | |||
9 | cd /etc/apt |
||
10 | grep -nr stretch . |
||
11 | |||
12 | If so, bring those up to buster and run updates first |
||
13 | https://redmine.palantetech.coop/projects/commons/wiki/Debian_9_to_10 |
||
14 | Edit this section |
||
15 | Metapackage check |
||
16 | |||
17 | Check to make sure kernel metapackage is installed, not just specific kernel |
||
18 | |||
19 | dpkg -l "linux-image*" | grep ^ii | grep -i meta should have results |
||
20 | If not, install metapackage |
||
21 | https://www.debian.org/releases/bullseye/amd64/release-notes/ch-upgrading.en.html#kernel-metapackage |
||
22 | Edit this section |
||
23 | Purged package check |
||
24 | |||
25 | List and purge removed packages with config files remaining |
||
26 | https://www.debian.org/releases/bullseye/amd64/release-notes/ch-upgrading.en.html#purge-removed-packages |
||
27 | |||
28 | aptitude search '~c' |
||
29 | aptitude purge '~c' |
||
30 | |||
31 | Edit this section |
||
32 | Hold check |
||
33 | |||
34 | These commands should have no results |
||
35 | |||
36 | aptitude search "~ahold" |
||
37 | dpkg --get-selections | grep 'hold$' |
||
38 | |||
39 | Edit this section |
||
40 | Update sources list |
||
41 | |||
42 | Check which sources exist that point to buster |
||
43 | |||
44 | cd /etc/apt |
||
45 | grep -nr buster . |
||
46 | |||
47 | Edit the main list, and any others that come up |
||
48 | |||
49 | vim /etc/apt/sources.list |
||
50 | |||
51 | replace buster with bullseye |
||
52 | |||
53 | :%s/buster/bullseye/g |
||
54 | |||
55 | replace bullseye/updates with bullseye-security |
||
56 | |||
57 | :%s/bullseye\/updates/bullseye-security/g |
||
58 | |||
59 | https://www.debian.org/releases/bullseye/amd64/release-notes/ch-information.en.html#security-archive |
||
60 | Edit this section |
||
61 | Upgrade the system |
||
62 | Edit this section |
||
63 | Update the sources |
||
64 | |||
65 | apt-get update |
||
66 | |||
67 | If you get a NO_PUBKEY error, see https://redmine.palantetech.coop/projects/commons/wiki/Debian_10_to_11#Common-problems |
||
68 | Edit this section |
||
69 | Check for Necessary Disk Space |
||
70 | |||
71 | apt-get -o APT::Get::Trivial-Only=true dist-upgrade |
||
72 | |||
73 | Edit this section |
||
74 | Minimal Upgrade |
||
75 | |||
76 | apt-get upgrade |
||
77 | |||
78 | if it asks whether to change /etc/apt/trusted.gpg.d/debian-archive-jessie-security-automatic.gpg, say yes |
||
79 | other things it asks to change, say no, keep the existing file |
||
80 | |||
81 | Edit this section |
||
82 | Full Upgrade |
||
83 | |||
84 | apt-get dist-upgrade |
||
85 | |||
86 | Edit this section |
||
87 | Change configs during full upgrade? |
||
88 | package change configs |
||
89 | nrpe no |
||
90 | sudoers no |
||
91 | journald no |
||
92 | backupninja no |
||
93 | nginx yes but recheck after |
||
94 | redis yes but recheck after |
||
95 | sshd_config yes but recheck after |
||
96 | glibc yes |
||
97 | logrotate.d/apache2 yes |
||
98 | Edit this section |
||
99 | Upgrade MySQL databases (if MySQL/MariaDB installed) |
||
100 | |||
101 | mysql_upgrade |
||
102 | |||
103 | Edit this section |
||
104 | Check that things are up |
||
105 | |||
106 | if a web server, make sure websites are up |
||
107 | if an infrastructure server, test and make sure all parts of the infrastructure are working properly |
||
108 | if a PTC server check the recovery plan entry for that server to make sure everything has recovered |
||
109 | |||
110 | Edit this section |
||
111 | Check what packages were removed |
||
112 | |||
113 | cat /var/log/apt/history.log | grep Remove |
||
114 | copy that into ongoing updates documentation for records |
||
115 | Make sure there was nothing important in there |
||
116 | If there were important packages in there |
||
117 | check aptitude to see if newer versions were already installed |
||
118 | check debian package search to search for what version is appropriate |
||
119 | https://packages.debian.org/ |
||
120 | |||
121 | Edit this section |
||
122 | Common problems |
||
123 | Edit this section |
||
124 | NO_PUBKEY during update |
||
125 | |||
126 | W: GPG error: https://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 7FCC7D46ACCC4CF8 |
||
127 | |||
128 | |||
129 | Add the key for the specified repository: |
||
130 | |||
131 | 0 meat:/etc/apt# sudo gpg -a --export 7FCC7D46ACCC4CF8 | sudo apt-key add - |
||
132 | |||
133 | |||
134 | See https://askubuntu.com/questions/13065/how-do-i-fix-the-gpg-error-no-pubkey for more information |
||
135 | Edit this section |
||
136 | Backupninja changes |
||
137 | |||
138 | After update, backupninja likely needs to be patched |
||
139 | https://redmine.palantetech.coop/projects/pt/wiki/Icinga2#Patch-the-backupninja-binary |
||
140 | |||
141 | Borg backup jobs to May First need to have port = 2201 added to the destination section. |