systemd-bootd + run-parts: /etc/initramfs/post-update.d//proxmox-boot-sync exited with return code 1

CRCinAU

Renowned Member
May 4, 2020
197
57
68
crc.id.au
Since removing grub and using systemd-bootd via proxmox-boot-tool, now updates via apt show:

Code:
root@mel-dc:~# apt dist-upgrade
Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 0
  1 not fully installed or removed.
  Space needed: 0 B / 39.4 GB available

Continue? [Y/n] y
Setting up initramfs-tools (0.148.3) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.148.3) ...
update-initramfs: Generating /boot/initrd.img-6.14.11-1-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/cmdline found - falling back to /proc/cmdline
Copying and configuring kernels on /dev/disk/by-uuid/9B23-358D
        Copying kernel and creating boot-entry for 6.14.11-1-pve
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:
 initramfs-tools
Error: Sub-process /usr/bin/dpkg returned an error code (1)
root@mel-dc:~#

To move to using systemd-bootd, I ran:
Code:
# umount /boot/efi
# proxmox-boot-tool format /dev/sda2 --force
# proxmox-boot-tool init /dev/sda2
# proxmox-boot-tool refresh
# blkid /dev/sda2
-- edited /etc/fstab and updated the UUID for /boot/efi --
# mount /boot/efi
 
if you use proxmox-boot-tool, you should not have the ESP mounted, since proxmox-boot-tool will take care of that.
 
I just ran into this issue as well. The error logging is not great and the actual issue is really hard to diagnose since the command that actual causes the exit code 1 is pretty much swallowed without output. I spent a lot of time to find this issue myself and finally stumbled across this as I came to post about it. Perhaps the scripts could do a better job pinpointing the issue for correction vs swallowing the error in a daisy-chained set of calls. I dont' even remember why I migrated to the boot-tool in the first place but I believe it was because I needed kernel headers.

The most confusing part is everything builds correctly but it will bomb due to apt being unable to configure the kernel package due to the exit 1 code. I removed both the proxmox postinst hook scripts to allow proper reconfiguration to happen and everything seems fine now.