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