#!/bin/bash # Build ISO image using livemedia-creator, with settings specified as variables here: IMAGE="Rocky9.4-NoCompromise-Desktop" GITDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) KS="NC_Rocky9_Workstation.ks" ROCKYISO="${HOME}/Rocky-9-latest-x86_64-boot.iso" # Image build home is $HOME/gdch-build by default # Reset image build directory to clean state rm -f livemedia.log program.log virt-install.log ./temp_iso_${IMAGE}.ks # Flatten kickstart to temporary file, and swap in private CIQ mountain access key: ksflatten -c ${GITDIR}/${KS} -o ./temp_iso_${IMAGE}.ks echo "Now launching build. Connect to 127.0.0.1:5930 (VNC) to see in real-time..." # run the image creation: livemedia-creator --ks ./temp_iso_${IMAGE}.ks --project "Rocky Community Desktop" \ --volid "rocky9live" --releasever 9 \ --make-iso --iso-only \ --iso-name ${IMAGE}.iso \ --iso ${ROCKYISO} \ --vnc="vnc=127.0.0.1:30" \ --ram 4096 --vcpus 2 \ --extra-boot-args 'i915.force_probe=* rd.driver.blacklist=nouveau nvidia_drm.modeset=0' \ --virt-uefi --nomacboot \ --resultdir ${IMAGE} #rm -f ./temp_iso_${IMAGE}.ks echo "Finished build. Making sha256sum..." pushd ${IMAGE} sha256sum --tag ${IMAGE}.iso > ${IMAGE}.iso.sha256sum.txt popd echo -e "\n\nFinished ISO image creation. ISO file can be found in $(pwd)/${IMAGE}/"