fedora-kickstarts/fedora-disk-base.ks

94 lines
2.5 KiB
Plaintext
Raw Normal View History

# 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
# 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
# Setup Raspberry Pi firmware
if [[ $arch == "aarch64" ]]; then
cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin
2019-12-13 04:34:51 +00:00
cp -P /usr/share/uboot/rpi_4/u-boot.bin /boot/efi/rpi4-u-boot.bin
cp -P /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin
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*
# Anaconda adds console=tty0 to the grub boot line on all images. this is problematic
# when you are using fedora via serial console as you do not get any output post grub
# linux does a good job of knowing what consoles need to be enabled.
# https://bugzilla.redhat.com/show_bug.cgi?id=2022757
if [[ $arch == "aarch64" ]]; then
sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf
fi
%end