PVE upgrade 7to8 partial fail

glo720

Member
Nov 17, 2021
3
1
8
42
So running through the scripts, Updated the system to 7.4 for before running the install. All the checks came back green. So I thought I was good to go. Ran the update from bullseye to bookworm without issue OS wise. At some point in the Proxmox upgrade it stated that it needs to remove proxmox so I obliged by touching /please-remove-proxmox-ve thinking this was a part of the process. After the script removed proxmox I'm now unable to update any packages or run any proxmox commands. At first I had to manually update the cephs repo as that wasn't updated to bookworm. However no updates can install as it seems apt wants to remove my running kernel.

Bash:
root@glosrv:~# apt update
Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://ftp.us.debian.org/debian bookworm InRelease
Hit:3 http://ftp.us.debian.org/debian bookworm-updates InRelease
Hit:4 http://download.proxmox.com/debian/pve bookworm InRelease
Hit:5 http://download.proxmox.com/debian/ceph-quincy bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@glosrv:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  pve-kernel-5.15.152-1-pve
The following NEW packages will be installed:
  libdouble-conversion3 libfmt9 liblttng-ust-common1 liblttng-ust-ctl5 liblttng-ust1 libpcre2-16-0 libqt5core5a libqt5dbus5 libqt5network5
  libthrift-0.17.0 qttranslations5-l10n
The following packages will be upgraded:
  ceph-fuse libcephfs2 librados2 libradosstriper1 librbd1 librgw2 python3-ceph-argparse python3-ceph-common
8 upgraded, 11 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/20.0 MB of archives.
After this operation, 363 MB disk space will be freed.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 118201 files and directories currently installed.)
Removing pve-kernel-5.15.152-1-pve (5.15.152-1) ...
Examining /etc/kernel/postrm.d.
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 5.15.152-1-pve /boot/vmlinuz-5.15.152-1-pve
update-initramfs: Deleting /boot/initrd.img-5.15.152-1-pve
run-parts: executing /etc/kernel/postrm.d/proxmox-auto-removal 5.15.152-1-pve /boot/vmlinuz-5.15.152-1-pve
/etc/kernel/postrm.d/proxmox-auto-removal: 4: .: cannot open /usr/share/proxmox-kernel-helper/scripts/functions: No such file
run-parts: /etc/kernel/postrm.d/proxmox-auto-removal exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/pve-kernel-5.15.152-1-pve.postrm line 14.
dpkg: error processing package pve-kernel-5.15.152-1-pve (--remove):
 installed pve-kernel-5.15.152-1-pve package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 pve-kernel-5.15.152-1-pve
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@glosrv:~#


No matter what I try to install/purge/remove apt can't get past this postrm script. Anyone seen this issue? The OS appears to be stable and I don't want to try to restore all my VM's and data on this, though I'm starting to think it may be FUBAR.
 
At some point in the Proxmox upgrade it stated that it needs to remove proxmox so I obliged by touching /please-remove-proxmox-ve thinking this was a part of the process. After the script removed proxmox I'm now unable to update any packages or run any proxmox commands
You could install PVE again similar to whats done when turning a Debian 12 into a PVE8: https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_12_Bookworm#Install_the_Proxmox_VE_Kernel

I would try a apt update && apt install proxmox-default-kernel proxmox-ve postfix open-iscsi chrony as well as apt --fix-broken install and apt dist-upgrade after fixing repos.
 
Last edited:
Thank you for your prompt reply. None of those will work as I have to get apt to either ignore removing the kernel or try to manually install the proxmox-kernel-helper as that seems to stop even the default kernel from being installed. After reboot I have to revert to an older kernel because now the latest one isn't available on /boot.
 
FIXED. On a hunch I enabled the repository for bullseye again to reinstall the "missing" kernel and the proxmox-kernel-helper. All installed successfully. Disabled bullseye repo and updated everything else, reinstalled proxmox and after a reboot proxmox 8.2.2 booted up nice and updated and all VM's functional! Crisis averted.
 
  • Like
Reactions: Kingneutron

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!