From c2824805beb80be2cd274407c1c1532984dfdcf6 Mon Sep 17 00:00:00 2001 From: humocs-man <251756307+humocs-man@users.noreply.github.com> Date: Mon, 9 Mar 2026 21:10:02 +0100 Subject: [PATCH] Update enable_anaconda.sh --- iso/enable_anaconda.sh | 123 ++++++++++++++++++++++++++--------------- 1 file changed, 78 insertions(+), 45 deletions(-) diff --git a/iso/enable_anaconda.sh b/iso/enable_anaconda.sh index 91b70f4..fdbcd01 100755 --- a/iso/enable_anaconda.sh +++ b/iso/enable_anaconda.sh @@ -1,59 +1,92 @@ #!/usr/bin/env bash -set -euxo pipefail +set -eoux pipefail -# -------------------------------------------------------------------- -# Phase 1: Rootfs vorbereiten – Anaconda erwartet KEIN /home -# -------------------------------------------------------------------- -rm -rf /home +# ------------------------------------------------------------------- +# Image metadata +# ------------------------------------------------------------------- +IMAGE_INFO="$(cat /usr/share/ublue-os/image-info.json)" +IMAGE_TAG="$(jq -r '."image-tag"' <<<"$IMAGE_INFO")" +IMAGE_REF="$(jq -r '."image-ref"' <<<"$IMAGE_INFO")" +IMAGE_REF="${IMAGE_REF##*://}" -# -------------------------------------------------------------------- -# Phase 2: Installer + Branding installieren -# -------------------------------------------------------------------- +# ------------------------------------------------------------------- +# Prevent suspend during installation (Anaconda requirement) +# ------------------------------------------------------------------- +tee /usr/share/glib-2.0/schemas/zz3-fluffy-pancake-installer-power.gschema.override <<'EOF' +[org.gnome.settings-daemon.plugins.power] +sleep-inactive-ac-type='nothing' +sleep-inactive-battery-type='nothing' +sleep-inactive-ac-timeout=0 +sleep-inactive-battery-timeout=0 + +[org.gnome.desktop.session] +idle-delay=uint32 0 +EOF + +glib-compile-schemas /usr/share/glib-2.0/schemas + +# ------------------------------------------------------------------- +# Install Anaconda (GNOME backend is implicit) +# ------------------------------------------------------------------- dnf install -y \ - anaconda \ anaconda-live \ - anaconda-webui \ - anaconda-webui-branding-fedora \ - polkit \ + libblockdev-btrfs \ + libblockdev-lvm \ + libblockdev-dm \ firefox -# -------------------------------------------------------------------- -# Phase 3: WebUI systemd-Servicefile anlegen -# -------------------------------------------------------------------- -cat > /usr/lib/systemd/system/anaconda-webui.service <<'EOF' -[Unit] -Description=Anaconda Web UI -After=network.target graphical.target +# ------------------------------------------------------------------- +# Anaconda profile (Fluffy Pancake) +# ------------------------------------------------------------------- +tee /etc/anaconda/profile.d/fluffy-pancake.conf <<'EOF' +[Profile] +profile_id = fluffy-pancake -[Service] -Type=simple -ExecStart=/usr/bin/anaconda-webui -Restart=on-failure +[Profile Detection] +os_id = fluffy-pancake -[Install] -WantedBy=graphical.target +[Network] +default_on_boot = FIRST_WIRED_WITH_LINK + +[Bootloader] +efi_dir = fedora +menu_auto_hide = True + +[Storage] +default_scheme = BTRFS +btrfs_compression = zstd:1 + +[Localization] +use_geolocation = False EOF -# -------------------------------------------------------------------- -# Phase 4: Service aktivieren -# -------------------------------------------------------------------- -systemctl enable anaconda-webui.service +# ------------------------------------------------------------------- +# OS identity (installer + installed system) +# ------------------------------------------------------------------- +sed -i 's/^ID=.*/ID=fluffy-pancake/' /usr/lib/os-release +grep -q '^VARIANT_ID=' /usr/lib/os-release || \ + echo 'VARIANT_ID=fluffy-pancake' >> /usr/lib/os-release -# -------------------------------------------------------------------- -# Phase 5: Desktop-Launcher für den Installer -# -------------------------------------------------------------------- -cat > /usr/share/applications/install-to-disk.desktop <<'EOF' -[Desktop Entry] -Name=Jetzt installieren -Comment=Installiere das System auf die Festplatte -Exec=xdg-open http://localhost:8080 -Icon=system-installer -Terminal=false -Type=Application -Categories=System; +. /etc/os-release +echo "Fluffy Pancake release $VERSION_ID ($VERSION_CODENAME)" > /etc/system-release + +# ------------------------------------------------------------------- +# Minimal Anaconda branding (no GNOME UX tweaks) +# ------------------------------------------------------------------- +sed -i -e 's/Fedora/Fluffy Pancake/g' \ + -e 's/CentOS/Fluffy Pancake/g' \ + /usr/share/anaconda/gnome/org.fedoraproject.welcome-screen.desktop || true + +# ------------------------------------------------------------------- +# Kickstart: install THIS image +# ------------------------------------------------------------------- +tee /usr/share/anaconda/interactive-defaults.ks <