From 376b1dfa7cdb87c0e3a071ca20704395ae6efc37 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Sun, 11 Jan 2026 17:46:41 +0100 Subject: [PATCH] Fixed Debian13 containers being unable to start after upgrade * This was caused by outdated SystemD generator, this file will be updated when upgrading the container --- ReleaseUpgradeALL.sh | 9 +++++++++ ReleaseUpgradeOne.sh | 9 +++++++++ functions.sh | 9 +++++++-- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/ReleaseUpgradeALL.sh b/ReleaseUpgradeALL.sh index 8dea5fc..de0a66f 100755 --- a/ReleaseUpgradeALL.sh +++ b/ReleaseUpgradeALL.sh @@ -60,6 +60,15 @@ if $DoDebianReleaseUpdate; then * ) echo "Choose yes or no.";; esac done + + if [ "${NewDebianVersion}" = "trixie" ]; then + curl -o /tmp/lxc.generator "https://raw.githubusercontent.com/lxc/distrobuilder/refs/heads/main/distrobuilder/lxc.generator" + # Check if the download was successful + if [ $? -ne 0 ]; then + echo "Downloading of lxc.generator from github failed. Exiting." + exit 1 + fi + fi fi if $DoAlpineReleaseUpdate; then echo "Enter the Alpine version to upgrade to" diff --git a/ReleaseUpgradeOne.sh b/ReleaseUpgradeOne.sh index cdf9310..ad4d878 100644 --- a/ReleaseUpgradeOne.sh +++ b/ReleaseUpgradeOne.sh @@ -78,6 +78,15 @@ if [[ "${DIST}" == *"debian"* ]]; then * ) echo "Choose yes or no.";; esac done + + if [ "${NewDebianVersion}" = "trixie" ]; then + curl -o /tmp/lxc.generator "https://raw.githubusercontent.com/lxc/distrobuilder/refs/heads/main/distrobuilder/lxc.generator" + # Check if the download was successful + if [ $? -ne 0 ]; then + echo "Downloading of lxc.generator from github failed. Exiting." + exit 1 + fi + fi elif [[ "${DIST}" == *"alpine"* ]]; then #Ask the wanted Alpine version DoAlpineReleaseUpdate=true diff --git a/functions.sh b/functions.sh index fec285e..75d459f 100644 --- a/functions.sh +++ b/functions.sh @@ -182,6 +182,7 @@ UpgradeRelease () { DOREBOOT=true # Post release cleanup if required if [ "${NewDebianVersion}" = "trixie" ]; then PostDebianTrixieTasks; fi + if [ "${NewDebianVersion}" = "trixie" ]; then CTOnlyPostDebianTrixieTasks; fi else echo "Notice: Skiped, already up-to-date" fi @@ -260,13 +261,17 @@ PostDebianTrixieTasks () { $INSTCALL -- apt modernize-sources -y $INSTCALL -- rm -f /etc/apt/sources.list.bak $INSTCALL -- rm -f /etc/apt/sources.list.d/*.bak - + $INSTCALL -- systemctl mask tmp.mount +} + +CTOnlyPostDebianTrixieTasks () { # Disable unwanted mounts $INSTCALL -- systemctl mask dev-mqueue.mount $INSTCALL -- systemctl mask run-lock.mount $INSTCALL -- systemctl mask sys-kernel-config.mount $INSTCALL -- systemctl mask sys-kernel-debug.mount - $INSTCALL -- systemctl mask tmp.mount + $INSTCALL -- rm /etc/systemd/system-generators/lxc + pct push $CTID /tmp/lxc.generator /etc/systemd/system-generators/lxc --perms 755 } PostAlpine323Tasks () {