upgrading from 8 to 9 unexpected changed file prompt systemd-boot

chrcoluk

Renowned Member
Oct 7, 2018
255
57
68
47
File '/etc/initramfs/post-update.d/systemd-boot' changed by someone (not me).

I compared old and new file, and the bit changed by proxmox seems important.

old

Code:
#!/bin/sh

# This hookfile has been disabled by proxmox-boot-tool
exit 0
#!/bin/sh

set -eu

test -x /usr/bin/bootctl || exit 0

bootctl is-installed --quiet || exit 0

echo "Updating kernel version $1 in systemd-boot..."

kernel-install add "$1" "/boot/vmlinuz-$1" "$2"

new

Code:
#!/bin/sh

set -eu

test -x /usr/bin/bootctl || exit 0

bootctl is-installed --quiet || exit 0

if [ -f "/boot/vmlinuz-$1" ]; then
    k="/boot/vmlinuz-$1"
elif [ -f "/boot/vmlinux-$1" ]; then
    k="/boot/vmlinux-$1"
else
    echo "Kernel version $1 not found in /boot."
    exit 0
fi

echo "Updating kernel version $1 in systemd-boot..."

kernel-install add "$1" "$k" "$2"
 
Ok the answer is it is safe to modify the file, after apt finished, the same modification was made afterwards automatically, but I suggest adding this to https://pve.proxmox.com/wiki/Upgrade_from_8_to_9

sysctl.conf gets completely wiped, which I know is already reported and I was prepared for it, but I think the warning needs to be updated to warn the user they need to backup the file as it will be wiped.

I would adjust the upgrade scripts to automatically move it to /etc/sysctl.d
 
Last edited:
Looks like it got installed during the upgrade process, when I ran pve8to9 prior to update there was no mention of the package, but now it shows "after" the update to 9.