# Fixes and tweaks to make things easier for end-users %post # Need DNS available, so we'll hack it up real quick: echo "nameserver 1.1.1.1" > /etc/resolv.conf # switch default kernel package to the -lt variant: echo -e "DEFAULTKERNEL=kernel-lt-core\nUPDATEDEFAULT=yes" > /etc/sysconfig/kernel # Enable crb and extras by default dnf config-manager --enable crb dnf config-manager --enable extras dnf config-manager --enable elrepo-kernel # Filthy hack alert: Had DNS resolution issues when building in mock. This is the "solution", for now: echo "nameserver 1.1.1.1" > /etc/resolv.conf curl -o /etc/yum.repos.d/nvidia.repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo cat > /etc/sysctl.d/80-i915-fix.conf < /dev/null flatpak update dnf -y makecache pkcon refresh force -c -1 -v # Enable dkms service: systemctl enable dkms # Visible char. marks for sudo: echo "Defaults pwfeedback" > /etc/sudoers.d/50_feedback # Make Anaconda install-to-disk icon visible in live environment: sed -i 's/NoDisplay=true/#NoDisplay=true/' /usr/share/applications/anaconda.desktop sed -i 's/NoDisplay=true/#NoDisplay=true/' /usr/share/applications/liveinst.desktop # Nvidia: double-check we have the latest dkms driver enabled and fully installed dnf -y module install nvidia-driver:latest-dkms # Anaconda config: tweak default partition options cat <<'EOF' >> /etc/anaconda/conf.d/05-desktop-storage-default.conf # Make default storage more basic for desktop use # Advanced users can obviously customize if they wish [Storage] default_partitioning = / (min 12 GiB) swap (min 2 GiB, max 4 GiB) default_scheme = PLAIN file_system_type = ext4 [Storage Constraints] min_partition_sizes = / 12 GiB /boot 2 GiB req_partition_sizes = / 12 GiB /boot 2 GiB EOF # Tweak the Anaconda /boot partition default size - may need bigger /boot to support multiple upstream kernels # Fun fact: /boot default is hard-coded in the python sources. Aint Anaconda great? sed --in-place=".orig" 's/Size("1GiB")/Size("2GiB")/g' /usr/lib64/python3.9/site-packages/pyanaconda/modules/storage/platform.py # Inside-the-ISO postinstall script # Anything put in /usr/shar/anaconda/post-scripts/*.ks will be run as a %post # after the user installs on their system from the booted live ISO. We need to do grub boot modification # only after Anaconda has run and installed on their system, not when this ISO is built: # Need to turn %post and %end into variables, or kickstart gets confused: export post="%post" export end="%end" cat > /usr/share/anaconda/post-scripts/95-kernel-gfx-args.ks <