summaryrefslogtreecommitdiff
path: root/installer
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-07-25 09:57:45 +0800
committertranch <tranch.xiao@gmail.com>2026-07-25 09:57:45 +0800
commitb4ce9b4030ed04a575466890d5caed9216f166a6 (patch)
treee9b7970feeb25082f018d8236992c67c965564b0 /installer
parent9c32f16d4c982559e1982454d2ee155e0f2efa48 (diff)
downloadAeroCore-OS-b4ce9b4030ed04a575466890d5caed9216f166a6.tar.gz
AeroCore-OS-b4ce9b4030ed04a575466890d5caed9216f166a6.zip
Normalize installer payload and host naming
Use a formal local installer image tag and set aerocore-os as the default hostname in both the live image and installed target system.
Diffstat (limited to 'installer')
-rw-r--r--installer/Containerfile2
-rwxr-xr-xinstaller/build.sh18
2 files changed, 18 insertions, 2 deletions
diff --git a/installer/Containerfile b/installer/Containerfile
index 34c5e28..fa5d731 100644
--- a/installer/Containerfile
+++ b/installer/Containerfile
@@ -2,7 +2,7 @@
# 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
+ARG INSTALL_IMAGE_PAYLOAD=ghcr.io/AeroCore-IO/aerocore-os:stable
ARG INSTALL_IMAGE_PAYLOAD_ARCHIVE=/install-payload.oci
FROM ${BASE_IMAGE}
diff --git a/installer/build.sh b/installer/build.sh
index aa30f42..c119dcc 100755
--- a/installer/build.sh
+++ b/installer/build.sh
@@ -111,6 +111,22 @@ df -h /var/tmp \${target_tmp}
%end
ostreecontainer --url=${INSTALL_IMAGE_PAYLOAD} --transport=containers-storage --no-signature-verification
+
+%post --nochroot --log=/tmp/aerocore-hostname.log
+set -eux
+target_root=
+for root in /mnt/sysroot /mnt/sysimage /var/mnt/sysimage; do
+ if mountpoint -q \${root}; then
+ target_root=\${root}
+ break
+ fi
+done
+if [ x\${target_root} = x ]; then
+ echo No mounted target system found for hostname setup >&2
+ exit 1
+fi
+systemd-firstboot --root=\${target_root} --hostname=aerocore-os
+%end
EOF
mkdir -p /usr/lib/bootc-image-builder
@@ -146,5 +162,5 @@ mkdir -p /boot/efi/EFI/BOOT
cp -v "${grubx64}" /boot/efi/EFI/BOOT/BOOTX64.EFI
cp -v "${grubx64}" /boot/efi/EFI/BOOT/fbx64.efi
-systemd-firstboot --timezone UTC
+systemd-firstboot --hostname aerocore-os --timezone UTC
dnf clean all