From 5d97bc6a1978c7ad71a3c1afe3d1cb9c32aa8683 Mon Sep 17 00:00:00 2001 From: Markus Hilger Date: Sun, 1 Nov 2026 22:16:57 +0100 Subject: [PATCH] Stop a diskless boot when the root filesystem cannot be extracted extract_untethered_rootimg reports failure, for example when the image does not fit into the memory backed root, but imageboot.sh ignored it and booted into the partly extracted root, which then hung later on. Stop with a message saying why instead. --- .../el10-diskless/profiles/default/scripts/imageboot.sh | 6 +++++- .../el9-diskless/profiles/default/scripts/imageboot.sh | 6 +++++- .../profiles/default/scripts/imageboot.sh | 6 +++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/confluent_osdeploy/el10-diskless/profiles/default/scripts/imageboot.sh b/confluent_osdeploy/el10-diskless/profiles/default/scripts/imageboot.sh index 988cc9f8..50429769 100644 --- a/confluent_osdeploy/el10-diskless/profiles/default/scripts/imageboot.sh +++ b/confluent_osdeploy/el10-diskless/profiles/default/scripts/imageboot.sh @@ -65,7 +65,11 @@ if [ "untethered" = "$imagemethod" -o "uncompressed" = "$imagemethod" ]; then else mount -t tmpfs disklessroot /sysroot fi - extract_untethered_rootimg + if ! extract_untethered_rootimg; then + # a partly extracted root would boot into a broken system + echo "Unable to boot: the root filesystem could not be extracted into memory, the image may be too large for an untethered boot on this node" + while :; do sleep 86400; done + fi else TETHERED=1 mount -o discard /dev/zram0 /mnt/overlay diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh b/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh index 7900cd96..2891aaad 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/imageboot.sh @@ -64,7 +64,11 @@ if [ "untethered" = "$imagemethod" -o "uncompressed" = "$imagemethod" ]; then else mount -t tmpfs disklessroot /sysroot fi - extract_untethered_rootimg + if ! extract_untethered_rootimg; then + # a partly extracted root would boot into a broken system + echo "Unable to boot: the root filesystem could not be extracted into memory, the image may be too large for an untethered boot on this node" + while :; do sleep 86400; done + fi else TETHERED=1 mount -o discard /dev/zram0 /mnt/overlay diff --git a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/imageboot.sh b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/imageboot.sh index 8efdef16..9e816e6a 100644 --- a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/imageboot.sh +++ b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/imageboot.sh @@ -98,7 +98,11 @@ elif [ "$imagemethod" = uncompressed ]; then mount -t tmpfs disklessroot /sysroot fi if [ "$TETHERED" = 0 ]; then - extract_untethered_rootimg + if ! extract_untethered_rootimg; then + # a partly extracted root would boot into a broken system + echo "Unable to boot: the root filesystem could not be extracted into memory, the image may be too large for an untethered boot on this node" + while :; do sleep 86400; done + fi elif [ ! -f /tmp/mountparts.sh ]; then mkdir -p /mnt/overlay/upper /mnt/overlay/work mount -t overlay -o upperdir=/mnt/overlay/upper,workdir=/mnt/overlay/work,lowerdir=/mnt/remote disklessroot /sysroot