#!/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 </dev/null; then cp -a /usr/lib/efi/*/*/EFI /boot/efi/ fi systemd-firstboot --timezone UTC dnf clean all