Kernel update, reboot required?

heutger

Famous Member
Apr 25, 2018
882
253
108
Fulda, Hessen, Germany
www.heutger.net
There was a recent kernel update from PMG. I try to keep the system clean and use pvekclean to remove old kernels. I expected, I need to reboot first and then be able to remove the old kernel, but it seems to have been used already. So my question is: Is there no reboot required? Are new kernels used directly? May it break then at next reboot?
 
You need to reboot to activate a new kernel.
 
  • Like
Reactions: Stoiko Ivanov
In addition to what @tom said
and use pvekclean to remove old kernels.
since PMG 7.2 you should be fine by just updating and running `apt autoremove` afterwards
(This has been the case for PVE since 6.4 IIRC, but a config-file was preventing the autmatic removal in PMG until recently)
 
I'm a bit confused. I use the unattended-updates, which should remove old kernels, but it doesn't. I tried pvekclean and it removed two kernels without reboot. I did a uname -a and it showed me the .15 kernel, after your message I rebooted and it still showed me the .15 kernel?

.15 in full: Linux pmg 5.15.74-1-pve #1 SMP PVE 5.15.74-1 (Mon, 14 Nov 2022 20:17:15 +0100) x86_64
 
Last edited:
I'm a bit confused. I use the unattended-updates, which should remove old kernels, but it doesn't.
the logs from unattended-upgrades might provide an idea why something was/was not removed

did a uname -a and it showed me the .15 kernel, after your message I rebooted and it still showed me the .15 kernel?
which kernel version did uname -a show exactly?
* 5.15.XX-Y-pve (XX is the patch version Y the abi version of a particular kernel package, and then there is the version of an actual kernel package) e.g.
Code:
 pve-kernel-5.15.30-2-pve              5.15.30-3
the package name (pve-kernel-5.15.30-2-pve) contains major (5), minor (15), patch level (30) and abi-version (2) - the package version is 5.15.30-3, since there were 3 packages of kernel version 5.15.30

see:
https://kernel-team.pages.debian.net/kernel-handbook/ch-versions.html
and
https://wiki.debian.org/DebianKernelABIChanges

I hope this explains it
 
Thanks, however it showed 5.15.74-1 before reboot as well as after reboot?
* Check in /var/log/apt/history.log (and term.log) what exactly got installed
* Check with `pmgversion -v` which kernel packages are installed
* make sure to not have pinned a particular version (`proxmox-boot-tool kernel unpin`)
 
I got a mail from apticron, next hours the kernel will be updated. I currently have this output:

root@pmg:~# uname -a
Linux pmg 5.15.74-1-pve #1 SMP PVE 5.15.74-1 (Mon, 14 Nov 2022 20:17:15 +0100) x86_64 GNU/Linux
root@pmg:~# pmgversion -v
proxmox-mailgateway: 7.2-1 (API: 7.2-2/fe97dfd3, running kernel: 5.15.74-1-pve)
pmg-api: 7.2-2
pmg-gui: 3.2-2
pve-kernel-helper: 7.3-1
pve-kernel-5.15: 7.2-14
pve-kernel-5.15.74-1-pve: 5.15.74-1
clamav-daemon: 0.103.7+dfsg-0+deb11u1
ifupdown2: 3.1.0-1+pmx3
libarchive-perl: 3.4.0-1
libjs-extjs: 7.0.0-1
libjs-framework7: 4.4.7-1
libproxmox-acme-perl: 1.4.3
libproxmox-acme-plugins: 1.4.3
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-1
libpve-http-server-perl: 4.1-5
libxdgmime-perl: 1.0-1
lvm2: 2.03.11-2.1
pmg-docs: 7.2-1
pmg-i18n: 2.8-1
pmg-log-tracker: 2.3.2-1
postgresql-13: 13.9-0+deb11u1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.0-1
proxmox-spamassassin: 3.4.6-5
proxmox-widget-toolkit: 3.5.3
pve-firmware: 3.6-1
pve-xtermjs: 4.16.0-1
zfsutils-linux: 2.1.6-pve1
root@pmg:~# uptime
16:37:18 up 7 days, 1:57, 1 user, load average: 0.00, 0.05, 0.07

I will then post again after update and before reboot.
 
In addition to what @tom said

since PMG 7.2 you should be fine by just updating and running `apt autoremove` afterwards
(This has been the case for PVE since 6.4 IIRC, but a config-file was preventing the autmatic removal in PMG until recently)
This kernel update I was required to reboot. Will keep an eye on. However, apt(-get) autoremove doesn’t show anything for removal, but pvekclean does and sure, after rebooting, I switched the kernel and there is something to remove? Will keep trying what unattendedupgrades will do on old kernel removal with next kernel update.
 
please post `pmgversion -v` else it's just guesswork what is working and what is not working

additionally post the output of `ls -l /etc/apt/apt.conf.d`
 
root@pmg:~# pmgversion -v
proxmox-mailgateway: 7.2-1 (API: 7.2-2/fe97dfd3, running kernel: 5.15.83-1-pve)
pmg-api: 7.2-2
pmg-gui: 3.2-2
pve-kernel-5.15: 7.3-1
pve-kernel-helper: 7.3-1
pve-kernel-5.15.83-1-pve: 5.15.83-1
pve-kernel-5.15.74-1-pve: 5.15.74-1
clamav-daemon: 0.103.7+dfsg-0+deb11u1
ifupdown2: 3.1.0-1+pmx3
libarchive-perl: 3.4.0-1
libjs-extjs: 7.0.0-1
libjs-framework7: 4.4.7-1
libproxmox-acme-perl: 1.4.3
libproxmox-acme-plugins: 1.4.3
libpve-apiclient-perl: 3.2-1
libpve-common-perl: 7.3-1
libpve-http-server-perl: 4.1-5
libxdgmime-perl: 1.0-1
lvm2: 2.03.11-2.1
pmg-docs: 7.2-1
pmg-i18n: 2.8-1
pmg-log-tracker: 2.3.2-1
postgresql-13: 13.9-0+deb11u1
proxmox-mini-journalreader: 1.3-1
proxmox-offline-mirror-helper: 0.5.0-1
proxmox-spamassassin: 3.4.6-5
proxmox-widget-toolkit: 3.5.3
pve-firmware: 3.6-2
pve-xtermjs: 4.16.0-1
zfsutils-linux: 2.1.7-pve1
root@pmg:~# ls -l /etc/apt/apt.conf.d
total 48
drwxr-xr-x 2 root root 4096 Dec 23 06:51 .
drwxr-xr-x 8 root root 4096 Dec 22 11:16 ..
-rw-r--r-- 1 root root 630 Jun 10 2021 01autoremove
-r--r--r-- 1 root root 120 Dec 23 06:50 01autoremove-kernels
-r--r--r-- 1 root root 496 Dec 7 21:17 01autoremove-postgresql
-rw-r--r-- 1 root root 80 Feb 19 2021 20auto-upgrades
-rw-r--r-- 1 root root 307 Mar 28 2021 20listchanges
-rw-r--r-- 1 root root 7392 Dec 11 11:49 50unattended-upgrades
-rw-r--r-- 1 root root 182 Jun 10 2021 70debconf
-rw-r--r-- 1 root root 23 Dec 23 01:09 76pmgproxy
-r--r--r-- 1 root root 203 Dec 23 06:51 76pveconf
root@pmg:~
 
pve-kernel-helper: 7.3-1
pve-kernel-5.15.83-1-pve: 5.15.83-1
pve-kernel-5.15.74-1-pve: 5.15.74-1
seems ok - proxmox-boot-tool (which handles the flagging of kernel for keeping and autoremoving, from the pve-kernel-helper package) keeps the last 2 installed kernels, and a kernel from each series (e.g. pve-kernel-5.15 and maybe later a pve-kernel-6.1)
see https://pve.proxmox.com/pve-docs/chapter-sysadmin.html#sysboot "Kernel Versions considered by proxmox-boot-tool"
(the docs are for PVE, but the code is shared with PMG )
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!