summaryrefslogtreecommitdiff
path: root/installer/build.sh
diff options
context:
space:
mode:
authortranch <tranch.xiao@gmail.com>2026-08-25 09:51:14 +0800
committertranch <tranch.xiao@gmail.com>2026-08-26 11:38:45 +0800
commit99c47421bdb444e2eb799c1db1fe11a8ea91dee3 (patch)
tree600dfca5b49c97483bd2fd1ae662b5ea6d428b20 /installer/build.sh
parent65906b9536aaebdec4169b40e7b9eb86b73e65fe (diff)
downloadAeroCore-OS-99c47421bdb444e2eb799c1db1fe11a8ea91dee3.tar.gz
AeroCore-OS-99c47421bdb444e2eb799c1db1fe11a8ea91dee3.zip
Document local live ISO reproduction path
Diffstat (limited to 'installer/build.sh')
-rwxr-xr-xinstaller/build.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/installer/build.sh b/installer/build.sh
index 205f18c..dda0706 100755
--- a/installer/build.sh
+++ b/installer/build.sh
@@ -157,6 +157,24 @@ fi
/usr/libexec/aerocore-configure-target-gpt-root \${target_root}
%end
+# Do not let stale Fedora boot files from an earlier installation collide with
+# the bootc payload being installed. This matches the upstream Bazzite
+# installer behavior; other vendor EFI directories are left untouched.
+%pre-install --erroronfail --log=/tmp/aerocore-efi-cleanup.log
+set -eux
+efi_root=
+for root in /mnt/sysroot /mnt/sysimage /var/mnt/sysroot /var/mnt/sysimage; do
+ if mountpoint -q \${root}/boot/efi; then
+ efi_root=\${root}/boot/efi
+ break
+ fi
+done
+if [ x\${efi_root} = x ]; then
+ echo No mounted EFI system partition found for cleanup >&2
+ exit 1
+fi
+rm -rf \${efi_root}/EFI/fedora
+%end
ostreecontainer --url=${INSTALL_IMAGE_PAYLOAD} --transport=containers-storage --no-signature-verification
# The local containers-storage deployment is intentionally unverified because