Project

General

Profile

Debian 11 to 12 » History » Version 4

Hannah Siwiec, 01/25/2024 04:41 PM

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