2017-04-12 15:14:53 +00:00
|
|
|
# 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
|
2020-07-09 01:13:34 +00:00
|
|
|
services --enabled=sshd,NetworkManager,chronyd
|
2017-04-12 15:14:53 +00:00
|
|
|
network --bootproto=dhcp --device=link --activate
|
|
|
|
rootpw --lock --iscrypted locked
|
|
|
|
shutdown
|
|
|
|
|
2017-09-24 19:39:17 +00:00
|
|
|
bootloader --timeout=1
|
2017-04-12 15:14:53 +00:00
|
|
|
|
|
|
|
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
|
Move exclusions of trousers-lib and iproute-tc to minimal-common
These are aiming to leave some weak dependencies out of minimal
images, it seems. From @core, gnutls recommends trousers which
requires trousers-lib, and iproute recommends iproute-tc.
However, both are *hard* dependencies of things that include
fedora-disk-base.ks. fedora-disk-workstation.ks includes
fedora-disk.base.ks and fedora-workstation-common.ks, so it
installs the Workstation package set, from which gnome-boxes
ultimately requires iproute-tc and NetworkManager-openconnect
ultimately requires trousers-lib.
Prior to the change I recently got merged into DNF, DNF would
silently drop gnome-boxes and NetworkManager-openconnect from
the Workstation disk image because of this. With the change, it
errors out on creation of the image.
To make the image compose again and actually include the right
packages, let's move the exclusions to fedora-minimal-common.ks,
where they make more sense anyway. This does mean the packages
will be pulled into other non-minimal images even if they're
not strictly required there, but that doesn't seem like a big
problem.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-09-25 21:57:35 +00:00
|
|
|
# Intel wireless firmware assumed never of use for disk images
|
2017-04-12 15:14:53 +00:00
|
|
|
-iwl*
|
|
|
|
-ipw*
|
2017-08-16 17:20:35 +00:00
|
|
|
-usb_modeswitch
|
2017-04-12 15:14:53 +00:00
|
|
|
-generic-release*
|
|
|
|
|
2020-10-06 18:40:05 +00:00
|
|
|
# make sure all the locales are available for inital-setup and anaconda to work
|
2017-04-12 15:14:53 +00:00
|
|
|
glibc-all-langpacks
|
|
|
|
|
|
|
|
%end
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
|
|
|
# Setup Raspberry Pi firmware
|
2020-10-06 15:43:28 +00:00
|
|
|
if [[ $arch == "aarch64" ]]; then
|
2017-04-12 15:14:53 +00:00
|
|
|
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
|
2021-11-21 19:22:12 +00:00
|
|
|
cp -P /usr/share/uboot/rpi_arm64/u-boot.bin /boot/efi/rpi-u-boot.bin
|
2020-10-06 15:43:28 +00:00
|
|
|
fi
|
2017-04-12 15:14:53 +00:00
|
|
|
|
2019-07-17 08:49:05 +00:00
|
|
|
releasever=$(rpm --eval '%{fedora}')
|
2017-04-12 15:14:53 +00:00
|
|
|
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
|
|
|
|
echo "Packages within this disk image"
|
2020-06-17 11:14:08 +00:00
|
|
|
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
|
2017-04-12 15:14:53 +00:00
|
|
|
|
|
|
|
# remove random seed, the newly installed instance should make it's own
|
|
|
|
rm -f /var/lib/systemd/random-seed
|
|
|
|
|
2017-11-03 18:24:21 +00:00
|
|
|
# The enp1s0 interface is a left over from the imagefactory install, clean this up
|
2021-03-21 19:14:59 +00:00
|
|
|
rm -f /etc/NetworkManager/system-connections/*.nmconnection
|
2017-11-03 18:24:21 +00:00
|
|
|
|
2017-04-12 15:14:53 +00:00
|
|
|
dnf -y remove dracut-config-generic
|
|
|
|
|
|
|
|
# Remove machine-id on pre generated images
|
|
|
|
rm -f /etc/machine-id
|
|
|
|
touch /etc/machine-id
|
|
|
|
|
2021-02-18 17:59:24 +00:00
|
|
|
# Note that running rpm recreates the rpm db files which aren't needed or wanted
|
|
|
|
rm -f /var/lib/rpm/__db*
|
|
|
|
|
2022-02-16 15:33:36 +00:00
|
|
|
# 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
|
2023-02-28 10:32:45 +00:00
|
|
|
if [[ $arch == "aarch64" ]]; then
|
2022-02-16 15:33:36 +00:00
|
|
|
sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf
|
|
|
|
fi
|
|
|
|
|
2017-04-12 15:14:53 +00:00
|
|
|
%end
|