diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-07-24 09:39:33 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-07-24 09:39:33 +0800 |
| commit | a25a2a1b1e7f170226f13656595b9c4db3c3bffd (patch) | |
| tree | 9bf2cc10362b3c238bb466cbb449bccfda3e4229 /installer | |
| parent | a7116e218cda6c5db5e7ba57faef638a54c500d6 (diff) | |
| download | AeroCore-OS-a25a2a1b1e7f170226f13656595b9c4db3c3bffd.tar.gz AeroCore-OS-a25a2a1b1e7f170226f13656595b9c4db3c3bffd.zip | |
Find live installer EFI files robustly
Avoid assuming the Fedora EFI directory layout when creating fbx64.efi.
Diffstat (limited to 'installer')
| -rwxr-xr-x | installer/build.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/installer/build.sh b/installer/build.sh index 6f1561f..2f8a26b 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -58,13 +58,21 @@ 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/ +efi_dir="$(find /usr/lib/efi -type d -name EFI -print -quit 2>/dev/null || true)" +if [[ -n "${efi_dir}" ]]; then + cp -a "${efi_dir}" /boot/efi/ fi # bootc-image-builder needs the Fedora live ISO fallback EFI loader. +grubx64="$(find /usr/lib/efi /boot/efi -type f \ + -path '*/EFI/fedora/grubx64.efi' -print -quit 2>/dev/null || true)" +if [[ -z "${grubx64}" ]]; then + echo "grubx64.efi was not found in the installed EFI tree" >&2 + find /usr/lib/efi /boot/efi -type f -path '*/EFI/*' -print >&2 || true + exit 1 +fi mkdir -p /boot/efi/EFI/BOOT -cp -v /boot/efi/EFI/fedora/grubx64.efi /boot/efi/EFI/BOOT/fbx64.efi +cp -v "${grubx64}" /boot/efi/EFI/BOOT/fbx64.efi systemd-firstboot --timezone UTC dnf clean all |
