Proxmov 7 to 8 failed - E: Sub-process /usr/bin/dpkg returned an error code (1)

smellycat

New Member
May 31, 2023
17
0
1
Hello i got in really bad situation. I tried to upgrade from 7 to 8 but after apt dist-upgrade i got error E: Sub-process /usr/bin/dpkg returned an error code (1).
I did not reboot yet and i am able to run VMs and on interface it says that Im on version 8 (img attacged). But I am afraid to reboot now. Can someone please help

If i run apt dist-upgrade again i am getting
Bash:
root@pve:~# apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  telnet
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
7 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up initramfs-tools (0.142+deb12u1) ...
update-initramfs: deferring update (trigger activated)
Setting up pve-kernel-5.15.158-2-pve (5.15.158-2) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 5.15.158-2-pve /boot/vmlinuz-5.15.158-2-pve
update-initramfs: Generating /boot/initrd.img-5.15.158-2-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/1E5B-6081
        Copying kernel and creating boot-entry for 5.15.158-2-pve
        Copying kernel and creating boot-entry for 6.8.12-5-pve
Copying and configuring kernels on /dev/disk/by-uuid/1E5B-AB56
        Copying kernel and creating boot-entry for 5.15.158-2-pve
cp: error writing '/var/tmp/espmounts/1E5B-AB56/EFI/proxmox/5.15.158-2-pve/initrd.img-5.15.158-2-pve': No space left on device
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/pve-kernel-5.15.158-2-pve.postinst line 19.
dpkg: error processing package pve-kernel-5.15.158-2-pve (--configure):
 installed pve-kernel-5.15.158-2-pve package post-installation script subprocess returned error exit status 2
Setting up proxmox-kernel-6.8.12-5-pve-signed (6.8.12-5) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 6.8.12-5-pve /boot/vmlinuz-6.8.12-5-pve
update-initramfs: Generating /boot/initrd.img-6.8.12-5-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/1E5B-6081
        Copying kernel and creating boot-entry for 5.15.158-2-pve
        Copying kernel and creating boot-entry for 6.8.12-5-pve
Copying and configuring kernels on /dev/disk/by-uuid/1E5B-AB56
        Copying kernel and creating boot-entry for 5.15.158-2-pve
cp: error writing '/var/tmp/espmounts/1E5B-AB56/EFI/proxmox/5.15.158-2-pve/initrd.img-5.15.158-2-pve': No space left on device
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/proxmox-kernel-6.8.12-5-pve-signed.postinst line 20.
dpkg: error processing package proxmox-kernel-6.8.12-5-pve-signed (--configure):
 installed proxmox-kernel-6.8.12-5-pve-signed package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of pve-kernel-5.15:
 pve-kernel-5.15 depends on pve-kernel-5.15.158-2-pve; however:
  Package pve-kernel-5.15.158-2-pve is not configured yet.

dpkg: error processing package pve-kernel-5.15 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of proxmox-kernel-6.8:
 proxmox-kernel-6.8 depends on proxmox-kernel-6.8.12-5-pve-signed | proxmox-kernel-6.8.12-5-pve; however:
  Package proxmox-kernel-6.8.12-5-pve-signed is not configured yet.
  Package proxmox-kernel-6.8.12-5-pve is not installed.
  Package proxmox-kernel-6.8.12-5-pve-signed which provides proxmox-kernel-6.8.12-5-pve is not configured yet.

dpkg: error processing package proxmox-kernel-6.8 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of proxmox-default-kernel:
 proxmox-default-kernel depends on proxmox-kernel-6.8; however:
  Package proxmox-kernel-6.8 is not configured yet.

dpkg: error processing package proxmox-default-kernel (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of proxmox-ve:
 proxmox-ve depends on proxmox-default-kernel; however:
  Package proxmox-default-kernel is not configured yet.

dpkg: error processing package proxmox-ve (--configure):
 dependency problems - leaving unconfigured
Processing triggers for initramfs-tools (0.142+deb12u1) ...
update-initramfs: Generating /boot/initrd.img-6.8.12-5-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/1E5B-6081
        Copying kernel and creating boot-entry for 5.15.158-2-pve
        Copying kernel and creating boot-entry for 6.8.12-5-pve
Copying and configuring kernels on /dev/disk/by-uuid/1E5B-AB56
        Copying kernel and creating boot-entry for 5.15.158-2-pve
cp: error writing '/var/tmp/espmounts/1E5B-AB56/EFI/proxmox/5.15.158-2-pve/initrd.img-5.15.158-2-pve': No space left on device
run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1
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:
 pve-kernel-5.15.158-2-pve
 proxmox-kernel-6.8.12-5-pve-signed
 pve-kernel-5.15
 proxmox-kernel-6.8
 proxmox-default-kernel
 proxmox-ve
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

I dont know why Im getting this kernel error and 'No space left on device'.

When i run:
Bash:
root@pve:~# df -h
Filesystem                    Size  Used Avail Use% Mounted on
udev                           16G     0   16G   0% /dev
tmpfs                         3.2G  2.1M  3.1G   1% /run
rpool/ROOT/pve-1              837G  7.7G  829G   1% /
tmpfs                          16G   40M   16G   1% /dev/shm
tmpfs                         5.0M     0  5.0M   0% /run/lock
/dev/sda1                     916G  138G  732G  16% /mnt/pve/backup
rpool                         829G  384K  829G   1% /rpool
media                         897G  128K  897G   1% /media
media/media                   900G  2.5G  897G   1% /media/media
rpool/ROOT                    829G  384K  829G   1% /rpool/ROOT
rpool/data                    829G  512K  829G   1% /rpool/data
rpool/data/subvol-105-disk-0   15G  2.5G   13G  17% /rpool/data/subvol-105-disk-0
rpool/data/subvol-103-disk-0  4.0G  2.3G  1.8G  57% /rpool/data/subvol-103-disk-0
rpool/data/subvol-287-disk-0   31G   12G   20G  38% /rpool/data/subvol-287-disk-0
rpool/data/subvol-104-disk-0   21G  8.4G   13G  40% /rpool/data/subvol-104-disk-0
storage                       900G  128K  900G   1% /storage
tmpfs                         3.2G     0  3.2G   0% /run/user/0
/dev/fuse                     128M   20K  128M   1% /etc/pve

Bash:
root@pve:~# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
1E5B-6081 is configured with: uefi (versions: 5.15.158-2-pve, 6.8.12-5-pve)
1E5B-AB56 is configured with: uefi (versions: 5.15.102-1-pve, 5.15.149-1-pve, 5.15.158-2-pve, 6.8.12-5-pve)
root@pve:~# ls -al /dev/disk/by-uuid/1E5B-6081
lrwxrwxrwx 1 root root 15 Dec 15 04:50 /dev/disk/by-uuid/1E5B-6081 -> ../../nvme0n1p2
root@pve:~# ls -al /dev/disk/by-uuid/1E5B-AB56
lrwxrwxrwx 1 root root 10 Dec 15 04:50 /dev/disk/by-uuid/1E5B-AB56 -> ../../sdc2

1734309516392.png
 
Last edited:
Hi,
seems like you have two disks ready to boot from, the nvme0n1 and sdc. On sdc you ran out of space.
So either free up space there (sdc2) or remove it from boot evaluation in update process, if not needed. Eventually modifiying /etc/kernel/proxmox-boot-uuids is sufficient already. Then try the update again.

If this works, you can check with efibootmgr -v the available boot entries for UEFI and can also remove the unnecessary one (-B -b <000x> ).
 
Hi @fba
Thank you for the reply. Yes I have a 2 disk one is a backup. Could you tell me how can I free up space on the other disk? I did the setup long time ago and to be honest I even forgot how I did it since everything worked without any issues
 
Last edited:
What kind of backup is it, by the way?

lsblk /dev/sdc will show, if sdc2 is mounted somewhere, already. If not, you will need to mount it and then follow some guide to clean it up. :)
Or you increase the size of the partition sdc2, but that requires more steps and might be more complicated.
 
@fba

I think i mirrored on the other one

lsblk /dev/sdc returned this:

Rich (BB code):
root@pve:~# lsblk /dev/sdc
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sdc      8:32   0 931.5G  0 disk
├─sdc1   8:33   0  1007K  0 part
├─sdc2   8:34   0     1G  0 part
└─sdc3   8:35   0 930.5G  0 part
1734391702864.png
 
Last edited:
Try it with command proxmox-boot-tool refresh first and post the output. Then run proxmox-boot-tool status again.
Both of the partitions should have the same kernels listed.

If not, you could re-init sdc2 with first: proxmox-boot-tool format /dev/sdc2, second proxmox-boot-tool init /dev/sdc2
Details to proxmox-boot-tool can be found here: https://pve.proxmox.com/wiki/Host_Bootloader
 

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!