update/upgrade issue with kernel PMG 7

Nov 19, 2021
4
0
6
38
Hi, I have PMG 7
After some update, I don't remember exactly which. I get errors when updating the kernel. Also, these errors appear when I want to upgrade from version 7 to version 8. When I try to configure the kernel, update, I get the same errors.

uname -r
5.10.0-26-amd64

Setting up linux-image-5.10.0-32-amd64 (5.10.223-1) ...
I: /vmlinuz.old is now a symlink to boot/vmlinuz-5.10.0-28-amd64
I: /initrd.img.old is now a symlink to boot/initrd.img-5.10.0-28-amd64
I: /vmlinuz is now a symlink to boot/vmlinuz-5.10.0-32-amd64
I: /initrd.img is now a symlink to boot/initrd.img-5.10.0-32-amd64
/etc/kernel/postinst.d/dkms:
dkms: WARNING: Linux headers are missing, which may explain the above failures.
please install the linux-headers-5.10.0-32-amd64 package to fix this.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.10.0-32-amd64
/etc/initramfs/post-update.d//proxmox-boot-sync: 10: /usr/sbin/proxmox-boot-tool: not found
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 127
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.10.0-32-amd64 (--configure):
installed linux-image-5.10.0-32-amd64 package post-installation script subprocess returned error exit status 1
Setting up linux-image-5.10.0-28-amd64 (5.10.209-2) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.10.0-28-amd64
/etc/initramfs/post-update.d//proxmox-boot-sync: 10: /usr/sbin/proxmox-boot-tool: not found
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 127
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.10.0-28-amd64 (--configure):
installed linux-image-5.10.0-28-amd64 package post-installation script subprocess returned error exit status 1
Setting up reportbug (7.10.3+deb11u2) ...
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-5.10.0-32-amd64 (= 5.10.223-1); however:
Package linux-image-5.10.0-32-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.10.0-32-amd64
/etc/initramfs/post-update.d//proxmox-boot-sync: 10: /usr/sbin/proxmox-boot-tool: not found
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 127
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-5.10.0-32-amd64
linux-image-5.10.0-28-amd64
linux-image-amd64
initramfs-tools
Removing linux-image-5.10.0-25-amd64 (5.10.191-1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.10.0-25-amd64
/etc/kernel/postrm.d/proxmox-auto-removal:
/etc/kernel/postrm.d/proxmox-auto-removal: 13: kernel_keep_versions: not found
run-parts: /etc/kernel/postrm.d/proxmox-auto-removal exited with return code 127
dpkg: error processing package linux-image-5.10.0-25-amd64 (--remove):
installed linux-image-5.10.0-25-amd64 package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.10.0-25-amd64
Processing was halted because there were too many errors.
 
Last edited:
Did you install on top of Debian? - I don't know, because this was done by the previous specialist, most likely, yes. Let's assume that it is installed on top of Debian.
Yes, I use the instructions, I have already updated one different PMG according to the instructions, but I have problems with this.
Please advise me on how to check which kernel is for the proxmox kernel, and how to remove the ones that are not needed?
 
Please try apt remove linux-image-amd64 && apt update && apt dist-upgrade
 
it seems /etc/kernel/postrm.d/proxmox-auto-removal doesn't allow to remove this


apt remove linux-image-amd64

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
telnet
Use 'apt autoremove' to remove it.
The following packages will be REMOVED:
linux-image-5.10.0-17-amd64 linux-image-5.10.0-25-amd64 linux-image-amd64
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 635 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 139784 files and directories currently installed.)
Removing linux-image-5.10.0-17-amd64 (5.10.136-1) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-5.10.0-17-amd64
/etc/kernel/postrm.d/proxmox-auto-removal:
/etc/kernel/postrm.d/proxmox-auto-removal: 13: kernel_keep_versions: not found
run-parts: /etc/kernel/postrm.d/proxmox-auto-removal exited with return code 127
dpkg: error processing package linux-image-5.10.0-17-amd64 (--remove):
installed linux-image-5.10.0-17-amd64 package post-removal script subprocess r1
dpkg: too many errors, stopping
Errors were encountered while processing:
linux-image-5.10.0-17-amd64
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
 
Last edited:
I managed to fix it, maybe a little rough, but everything worked.
these files did not allow me to delete the kernel via apt
removed files
/etc/apt/apt.conf.d/01autoremove
/etc/apt/apt.conf.d/01autoremove-kernels

removed folders
/lib/modules/5-*-amd64
/lib/modules/4-*-amd64
/boot/linux-image*-amd

did not delete the folders/files
/lib/modules/*-pve
/boot/*-pve

apt-get --purge remove linux-image-*-amd64
dpkg --purge linux-image-*-amd64

apt reinstall gdisk proxmox-kernel-helper pve-firmware pve-kernel-5.15 pve-kernel-5.15.158-2-pve
apt reinstall proxmox-mailgateway

after these manipulations everything updated without problems.
I hope this helps someone.