diff --git a/fedora-arm-minimal.ks b/fedora-arm-minimal.ks index f03231a..02af155 100644 --- a/fedora-arm-minimal.ks +++ b/fedora-arm-minimal.ks @@ -1,25 +1,6 @@ %include fedora-arm-base.ks +%include fedora-minimal-common.ks part /boot --size=512 --fstype ext4 part swap --size=256 --fstype swap part / --size=1200 --fstype ext4 - -%packages --@standard --initial-setup-gui --generic-release* --glibc-all-langpacks -glibc-langpack-en -iw -NetworkManager-wifi -%end - -%post - -# setup systemd to boot to the right runlevel -echo -n "Setting default runlevel to multiuser text mode" -rm -f /etc/systemd/system/default.target -ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target -echo . - -%end diff --git a/fedora-disk-base.ks b/fedora-disk-base.ks new file mode 100644 index 0000000..4ff9c6f --- /dev/null +++ b/fedora-disk-base.ks @@ -0,0 +1,95 @@ +# 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 +auth --useshadow --passalgo=sha512 +selinux --enforcing +firewall --enabled --service=mdns +services --enabled=NetworkManager,ModemManager --disabled=sshd +network --bootproto=dhcp --device=link --activate +rootpw --lock --iscrypted locked +shutdown + +bootloader --timeout=1 --append="no_timer_check console=tty1 console=ttyS0,115200n8" + +zerombr +clearpart --all --initlabel --disklabel=msdos +autopart --type=plain + +# make sure that initial-setup runs and lets us do all the configuration bits +firstboot --reconfig + +services --enabled=sshd,NetworkManager,chronyd,initial-setup + +%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 +rng-tools +chrony +bcm283x-firmware +uboot-images-armv8 +-uboot-images-armv7 +initial-setup +-iwl* +-ipw* +-trousers-lib +-generic-release* + +# make sure all the locales are available for inital0-setup and anaconda to work +glibc-all-langpacks + +# workaround for consequence of RHBZ #1324623: without this, with +# yum-based creation tools, compose fails due to conflict between +# libcrypt and libcrypt-nss. dnf does not seem to have the same +# issue, so this may be dropped when appliance-creator is ported +# to dnf. +libcrypt-nss +-libcrypt +%end + +%post + +# Setup Raspberry Pi firmware +cp -Pr /usr/share/bcm283x-firmware/* /boot/efi/ +cp -P /usr/share/uboot/rpi_3/u-boot.bin /boot/efi/rpi3-u-boot.bin + +releasever=$(rpm -q --qf '%{version}\n' fedora-release) +rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary +echo "Packages within this disk image" +rpm -qa +# Note that running rpm recreates the rpm db files which aren't needed or wanted +rm -f /var/lib/rpm/__db* + +# remove random seed, the newly installed instance should make it's own +rm -f /var/lib/systemd/random-seed + +dnf -y remove dracut-config-generic + +# Disable network service here, as doing it in the services line +# fails due to RHBZ #1369794 +/sbin/chkconfig network off + +# Remove machine-id on pre generated images +rm -f /etc/machine-id +touch /etc/machine-id + +%end diff --git a/fedora-disk-minimal.ks b/fedora-disk-minimal.ks new file mode 100644 index 0000000..b37562b --- /dev/null +++ b/fedora-disk-minimal.ks @@ -0,0 +1,2 @@ +%include fedora-disk-base.ks +%include fedora-minimal-common.ks diff --git a/fedora-minimal-common.ks b/fedora-minimal-common.ks new file mode 100644 index 0000000..42eef06 --- /dev/null +++ b/fedora-minimal-common.ks @@ -0,0 +1,19 @@ +%packages +-@standard +-initial-setup-gui +-generic-release* +-glibc-all-langpacks +glibc-langpack-en +iw +NetworkManager-wifi +%end + +%post + +# setup systemd to boot to the right runlevel +echo -n "Setting default runlevel to multiuser text mode" +rm -f /etc/systemd/system/default.target +ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target +echo . + +%end