mirror of
https://pagure.io/fedora-kickstarts.git
synced 2024-11-25 16:43:08 +00:00
96 lines
2.5 KiB
Plaintext
96 lines
2.5 KiB
Plaintext
# fedora-disk-base.ks
|
|
#
|
|
# Defines the basics for all kickstarts in the fedora-live branch
|
|
# Does not include package selection (other then mandatory)
|
|
# Does not include localization packages or configuration
|
|
#
|
|
# Does includes "default" language configuration (kickstarts including
|
|
# this template can override these settings)
|
|
|
|
text
|
|
lang en_US.UTF-8
|
|
keyboard us
|
|
timezone US/Eastern
|
|
selinux --enforcing
|
|
firewall --enabled --service=mdns
|
|
services --enabled=sshd,NetworkManager,chronyd
|
|
network --bootproto=dhcp --device=link --activate
|
|
rootpw --lock --iscrypted locked
|
|
shutdown
|
|
|
|
bootloader --timeout=1
|
|
|
|
zerombr
|
|
clearpart --all --initlabel --disklabel=msdos
|
|
|
|
# make sure that initial-setup runs and lets us do all the configuration bits
|
|
firstboot --reconfig
|
|
|
|
%include fedora-repo.ks
|
|
|
|
%packages
|
|
@core
|
|
@standard
|
|
@hardware-support
|
|
|
|
kernel
|
|
# on 32bit arm make sure we only install one kernel
|
|
-kernel-lpae
|
|
# remove this in %post
|
|
dracut-config-generic
|
|
-dracut-config-rescue
|
|
# install tools needed to manage and boot arm systems
|
|
@arm-tools
|
|
chrony
|
|
bcm283x-firmware
|
|
initial-setup
|
|
# Intel wireless firmware assumed never of use for disk images
|
|
-iwl*
|
|
-ipw*
|
|
-usb_modeswitch
|
|
-generic-release*
|
|
|
|
# make sure all the locales are available for inital-setup and anaconda to work
|
|
glibc-all-langpacks
|
|
|
|
%end
|
|
|
|
%post
|
|
|
|
# Find the architecture we are on
|
|
arch=$(uname -m)
|
|
|
|
# Setup Raspberry Pi firmware
|
|
if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then
|
|
if [[ $arch == "aarch64" ]]; then
|
|
cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin
|
|
cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin
|
|
else
|
|
cp -P /usr/share/uboot/rpi_2/u-boot.bin /boot/efi/rpi2-u-boot.bin
|
|
cp -P /usr/share/uboot/rpi_3_32b/u-boot.bin /boot/efi/rpi3-u-boot.bin
|
|
cp -P /usr/share/uboot/rpi_4_32b/u-boot.bin /boot/efi/rpi4-u-boot.bin
|
|
fi
|
|
fi
|
|
|
|
releasever=$(rpm --eval '%{fedora}')
|
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
|
|
echo "Packages within this disk image"
|
|
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
|
|
|
# remove random seed, the newly installed instance should make it's own
|
|
rm -f /var/lib/systemd/random-seed
|
|
|
|
# The enp1s0 interface is a left over from the imagefactory install, clean this up
|
|
rm -f /etc/NetworkManager/system-connections/*.nmconnection
|
|
|
|
dnf -y remove dracut-config-generic
|
|
|
|
# Remove machine-id on pre generated images
|
|
rm -f /etc/machine-id
|
|
touch /etc/machine-id
|
|
|
|
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
|
rm -f /var/lib/rpm/__db*
|
|
|
|
%end
|