Project

General

Profile

Debian 11 to 12 » History » Version 5

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