Project

General

Profile

Debian 11 to 12 » History » Version 8

Hannah Siwiec, 01/26/2024 04:00 PM

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