summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-07-12 23:33:44 +0800
committertranch <tranch.xiao@gmail.com>2026-07-12 23:33:44 +0800
commit42a6ff3286804854c1c21a7e62158f09e19a9b09 (patch)
tree1276369ae98f138054878e04dac49b8a9c3ca4d1 /installer
parent7280cc006eefe14a71ee19a66bc8b2c6d55c4887 (diff)
downloadAeroCore-OS-42a6ff3286804854c1c21a7e62158f09e19a9b09.tar.gz
AeroCore-OS-42a6ff3286804854c1c21a7e62158f09e19a9b09.zip
Add live installer build workflow
Add a Bazzite-style installer payload, CI workflow, and local\nPodman commands for building and testing the live ISO.\n\nFix stale disk image configuration references and installer targets.
Diffstat (limited to 'installer')
-rw-r--r--installer/Containerfile15
-rwxr-xr-xinstaller/build.sh60
-rw-r--r--installer/iso.yaml10
-rw-r--r--installer/lorax_templates/remove_root_password_prompt.tmpl1
-rw-r--r--installer/lorax_templates/set_default_user.tmpl1
5 files changed, 87 insertions, 0 deletions
diff --git a/installer/Containerfile b/installer/Containerfile
new file mode 100644
index 0000000..fa817b6
--- /dev/null
+++ b/installer/Containerfile
@@ -0,0 +1,15 @@
+# Build the live installer payload from a desktop Bazzite runtime.
+# The image installed to disk is supplied separately as INSTALL_IMAGE_PAYLOAD.
+
+ARG BASE_IMAGE=ghcr.io/ublue-os/bazzite:stable
+ARG INSTALL_IMAGE_PAYLOAD=ghcr.io/AeroCore-IO/aerocore-bazzite-image:stable
+
+FROM ${BASE_IMAGE}
+
+ARG BASE_IMAGE
+ARG INSTALL_IMAGE_PAYLOAD
+
+RUN --mount=type=bind,source=.,target=/src \
+ env BASE_IMAGE="${BASE_IMAGE}" \
+ INSTALL_IMAGE_PAYLOAD="${INSTALL_IMAGE_PAYLOAD}" \
+ /src/installer/build.sh
diff --git a/installer/build.sh b/installer/build.sh
new file mode 100755
index 0000000..7532df8
--- /dev/null
+++ b/installer/build.sh
@@ -0,0 +1,60 @@
+#!/usr/bin/env bash
+
+set -euxo pipefail
+
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+BASE_IMAGE=${BASE_IMAGE:?}
+INSTALL_IMAGE_PAYLOAD=${INSTALL_IMAGE_PAYLOAD:?}
+
+# The installer is a live KDE environment. Keep the installed system payload
+# separate: it is the AeroCore image, while BASE_IMAGE provides the live UI.
+dnf install -y \
+ anaconda-live \
+ libblockdev-btrfs \
+ libblockdev-dm \
+ libblockdev-lvm \
+ dracut-live \
+ livesys-scripts \
+ grub2-efi-x64-cdboot
+
+# Apply the same AeroCore overlay to the live session where possible.
+if [[ -d /src/system_files ]]; then
+ cp -a /src/system_files/. /
+fi
+
+# Make the install payload available to Anaconda. When the build is running
+# with the host container store mounted, this avoids a second registry pull.
+if mountpoint -q /usr/lib/containers/storage; then
+ podman save --format oci-archive "${INSTALL_IMAGE_PAYLOAD}" | \
+ podman load --storage-opt additionalimagestore=''
+else
+ podman pull "${INSTALL_IMAGE_PAYLOAD}"
+fi
+
+# Tell Anaconda to install the bootc container that was loaded above.
+mkdir -p /var/lib/rpm-state
+cat >> /usr/share/anaconda/interactive-defaults.ks <<EOF
+ostreecontainer --url=${INSTALL_IMAGE_PAYLOAD} --transport=containers-storage --no-signature-verification
+EOF
+
+mkdir -p /usr/lib/bootc-image-builder
+cp "${SCRIPT_DIR}/iso.yaml" /usr/lib/bootc-image-builder/iso.yaml
+
+kernel="$(kernel-install list --json pretty | jq -r \
+ '.[] | select(.has_kernel == true) | .version' | head -n1)"
+if [[ -n "${kernel}" && -d "/usr/lib/modules/${kernel}" ]]; then
+ DRACUT_NO_XATTR=1 dracut -v --force --zstd --reproducible --no-hostonly \
+ --add "dmsquash-live dmsquash-live-autooverlay" \
+ "/usr/lib/modules/${kernel}/initramfs.img" "${kernel}"
+fi
+
+sed -i 's/^livesys_session=.*/livesys_session=kde/' /etc/sysconfig/livesys
+systemctl enable livesys.service livesys-late.service
+
+mkdir -p /boot/efi
+if compgen -G '/usr/lib/efi/*/*/EFI' >/dev/null; then
+ cp -a /usr/lib/efi/*/*/EFI /boot/efi/
+fi
+
+systemd-firstboot --timezone UTC
+dnf clean all
diff --git a/installer/iso.yaml b/installer/iso.yaml
new file mode 100644
index 0000000..8e6bd73
--- /dev/null
+++ b/installer/iso.yaml
@@ -0,0 +1,10 @@
+label: "AeroCore-Live"
+grub2:
+ timeout: 3
+ entries:
+ - name: "Launch AeroCore Installer"
+ linux: "/images/pxeboot/vmlinuz quiet rhgb root=live:CDLABEL=AeroCore-Live enforcing=0 rd.live.image"
+ initrd: "/images/pxeboot/initrd.img"
+ - name: "Launch AeroCore Installer (Basic Graphics Mode)"
+ linux: "/images/pxeboot/vmlinuz quiet rhgb root=live:CDLABEL=AeroCore-Live enforcing=0 rd.live.image nomodeset"
+ initrd: "/images/pxeboot/initrd.img"
diff --git a/installer/lorax_templates/remove_root_password_prompt.tmpl b/installer/lorax_templates/remove_root_password_prompt.tmpl
new file mode 100644
index 0000000..3bd0342
--- /dev/null
+++ b/installer/lorax_templates/remove_root_password_prompt.tmpl
@@ -0,0 +1 @@
+append etc/anaconda/profile.d/fedora-kinoite.conf "\\n[User Interface]\\nhidden_spokes =\\n PasswordSpoke"
diff --git a/installer/lorax_templates/set_default_user.tmpl b/installer/lorax_templates/set_default_user.tmpl
new file mode 100644
index 0000000..b4cf2c8
--- /dev/null
+++ b/installer/lorax_templates/set_default_user.tmpl
@@ -0,0 +1 @@
+append usr/share/anaconda/interactive-defaults.ks "\\nuser --name=aerocore --password=aerocore --plaintext --groups=wheel"