mirror of
https://pagure.io/fedora-kickstarts.git
synced 2024-12-22 05:35:26 +00:00
d56b41ce0d
Appending console=tty0 is problematic for many arm use cases. lets make sure we remove it so systems can just boot https://bugzilla.redhat.com/show_bug.cgi?id=2022757 Signed-off-by: Dennis Gilmore <dennis@ausil.us>
105 lines
2.9 KiB
Plaintext
105 lines
2.9 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
|
|
cp -P /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-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*
|
|
|
|
# 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" ]] || [[ $arch == "armv7l" ]]; then
|
|
sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf
|
|
fi
|
|
|
|
%end
|