diff options
| author | Tranch <tranch.xiao@gmail.com> | 2026-07-24 10:59:03 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-24 10:59:03 +0800 |
| commit | cc32cf45925351bb292f7c1ba46bdcfee4a9535c (patch) | |
| tree | 687f62b59f4bef52926bb3b9c3d428bd09118c70 /installer/build.sh | |
| parent | 33ccd0f64b93bb615a771b6f246bcdb4cb3969f1 (diff) | |
| parent | e41af95f56d4cbfee68081f82dd329ee68486267 (diff) | |
| download | AeroCore-OS-cc32cf45925351bb292f7c1ba46bdcfee4a9535c.tar.gz AeroCore-OS-cc32cf45925351bb292f7c1ba46bdcfee4a9535c.zip | |
Merge pull request #9 from AeroCore-IO/feature/live-installer-efi
Fix live installer GRUB EFI fallback and improve file handling
Diffstat (limited to 'installer/build.sh')
| -rwxr-xr-x | installer/build.sh | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/installer/build.sh b/installer/build.sh index 921e628..efce782 100755 --- a/installer/build.sh +++ b/installer/build.sh @@ -19,6 +19,13 @@ dnf --setopt=excludepkgs= install -y \ libblockdev-lvm \ dracut-live \ livesys-scripts \ + grub2-efi-x64 \ + grub2-efi-x64-cdboot + +# Kinoite can carry the EFI packages in the RPM database without their files +# materialized in the container filesystem. Restore the files for the ISO. +dnf --setopt=excludepkgs= reinstall -y \ + grub2-efi-x64 \ grub2-efi-x64-cdboot # Apply the same AeroCore overlay to the live session where possible. @@ -57,12 +64,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. -cp -v /boot/efi/EFI/fedora/grubx64.efi /boot/efi/EFI/BOOT/fbx64.efi +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 "${grubx64}" /boot/efi/EFI/BOOT/fbx64.efi systemd-firstboot --timezone UTC dnf clean all |
