diff --git a/image-recipe/build-auto-installer-iso.sh b/image-recipe/build-auto-installer-iso.sh index 7ea62e48..7ceb6571 100755 --- a/image-recipe/build-auto-installer-iso.sh +++ b/image-recipe/build-auto-installer-iso.sh @@ -186,6 +186,15 @@ check_tools() { echo "Using container runtime: $CONTAINER_CMD" + # Fix root podman D-Bus issue (sd-bus: Transport endpoint is not connected) + # When running as sudo, systemd cgroup manager can't reach the user D-Bus session. + if [ "$CONTAINER_CMD" = "podman" ] && [ "$(id -u)" = "0" ]; then + if ! $CONTAINER_CMD run --rm debian:bookworm true 2>/dev/null; then + echo " Root podman D-Bus issue detected, using cgroupfs manager" + CONTAINER_CMD="podman --cgroup-manager=cgroupfs" + fi + fi + # Ensure insecure registry config for Archipelago app registry (HTTP) if [ "$CONTAINER_CMD" = "podman" ]; then mkdir -p /etc/containers/registries.conf.d