This is an automated email from the git hooks/post-receive script.
kevin pushed a commit to branch f37
in repository fedora-kickstarts.
commit 734e000de5c3ff5fa34d7d32d0676856be3933e4
Author: Peter Boy <pb(a)resdigita.de>
AuthorDate: Mon Aug 22 17:05:47 2022 +0200
Added missing fedora-repo include.
---
fedora-server-vm-full.ks | 178 ++++++++++++++++++++++++++---------------------
1 file changed, 97 insertions(+), 81 deletions(-)
diff --git a/fedora-server-vm-full.ks b/fedora-server-vm-full.ks
old mode 100755
new mode 100644
index 820335a..c487880
--- a/fedora-server-vm-full.ks
+++ b/fedora-server-vm-full.ks
@@ -1,8 +1,10 @@
-# fedora-server-vm-full.ks
+# fedora-server-vm-full.ks (rel. 1.0)
# Kickstart file to build a Fedora Server Edition VM disk image.
# The image aims to resemble as close as technically possible the
# full features of a Fedora Server Edition in a virtual machine.
#
+# The image uses GPT partition type as of default in Fedora 37
+#
# At first boot it opens a test based basic configuration screen.
#
# This kickstart file is designed to be used with ImageFactory (in Koji).
@@ -12,20 +14,29 @@
# See Fedora Server Edition user documentation tutorial.
+# Use text mode install
+text
+
# Keyboard layouts
keyboard 'us'
+# System language
+lang en_US.UTF-8
+
+# System timezone
+# set time zone to GMT (Etcetera/UTC)
+timezone Etc/UTC --utc
+
+
# Root password
rootpw --iscrypted --lock locked
-# System language
-lang en_US.UTF-8
+# SELinux configuration
+selinux --enforcing
-# Shutdown after installation
-shutdown
-# Use text mode install
-text
+# System bootloader configuration
+bootloader --location=mbr --timeout=1 --append="console=tty1
console=ttyS0,115200n8"
# Network information
network --bootproto=dhcp --device=link --activate --onboot=on
@@ -33,32 +44,71 @@ network --bootproto=dhcp --device=link --activate --onboot=on
# Firewall configuration
firewall --enabled --service=mdns
-# System timezone
-# set time zone to GMT (Etcetera/UTC)
-timezone Etc/UTC --utc
+
+# System services
+# message: error enabling initial-setup, initial-setup does not exist
+services --enabled="sshd,NetworkManager,chronyd,initial-setup"
# Run the Setup Agent on first boot
firstboot --reconfig
-# SELinux configuration
-selinux --enforcing
+# Partition Information. Use GPT by default (since Fedora 37)
+# Resemble the Partitioning used for Fedora Server Install media
+clearpart --all --initlabel --disklabel=gpt
+part biosboot --size=1 --fstype=biosboot
+part /boot --size=1000 --fstype=xfs --label=boot
+part pv.007 --size=4000 --grow
+volgroup sysvg pv.007
+logvol / --vgname=sysvg --size=4000 --grow --maxsize=16000 --fstype=xfs --name=root
--label=sysroot
-# System services
-# message: error enabling initial-setup, initial-setup does not exist
-services --enabled="sshd,NetworkManager,chronyd,initial-setup"
-# System bootloader configuration
-bootloader --location=mbr --timeout=1 --append="console=tty1
console=ttyS0,115200n8"
+# Include URLs for network installation dynamically, dependent from Fedora release
+# and imagefactory runtime environment
+%include fedora-repo.ks
+
+# Shutdown after installation
+shutdown
+
+
+
+##### begin package list #############################################
+%packages --inst-langs=en
+
+@server-product
+@core
+@headless-management
+@standard
+@networkmanager-submodules
+##@container-management
+@domain-client
+@guest-agents
+
+# All arm-tools packages install on aarch64/armhfp only
+# TODO: on a x86_64 devel environment are @arm-tools not available
+# and cause a build error.
+# @arm-tools
+
+# Standard Fedora Package Groups
+## dracut-config-generic ## included in =core=
+glibc-all-langpacks
+initial-setup
+kernel-core
+-dracut-config-rescue
+-generic-release*
+-initial-setup-gui
+-kernel
+-linux-firmware
+-plymouth
+# pulled in by @standard
+-smartmontools
+-smartmontools-selinux
+
+%end
+##### end package list ###############################################
-# Partition Information. Use default partitioning as configured in Anaconda on
-# Server Edition distribution media
-autopart --noswap
-# Clear the Master Boot Record
-zerombr
-# Partition clearing information
-clearpart --all --initlabel --disklabel=msdos
-%post --erroronfail
+##### begin kickstart post script ####################################
+%post --erroronfail --log=/root/anaconda-post-1.log
# Find the architecture we are on
arch=$(uname -m)
@@ -81,25 +131,21 @@ rm -f /var/lib/systemd/random-seed
echo "Cleanup leftover networking configuration"
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
-
# Truncate the /etc/resolv.conf left over from NetworkManager during the
-# kickstart. This causes delays in boot with cloud-init because the
-# 192.168.122.1 DNS server cannot be reached.
+# kickstart because the DNS server is environment specific.
truncate -s 0 /etc/resolv.conf
+echo "Cleaning repodata to save space."
+dnf clean all
+
# linux-firmware is installed by default and is quite large. As of mid 2020:
# Total download size: 97 M
# Installed size: 268 M
-# So far we've been fine shipping without it so let's continue.
-# More discussion about this in #1234504.
+# Not needed in virtual environment.
echo "Removing linux-firmware package."
rpm -e linux-firmware
+ Will ever anybody see this?
echo "Packages within this disk image"
rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
@@ -107,20 +153,26 @@ rpm -qa --qf
'%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn
rm -f /var/lib/rpm/__db*
+ Do we need a serial terminal with a VM?
if [[ $arch == "aarch64" ]] || [[ $arch == "armv7l" ]]; then
+ # 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
+ sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf
+fi
-# 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
-sed -i -e 's|console=tty0||g' /boot/loader/entries/*conf
-fi
+# Remove machine-id on pre generated images
+rm -f /etc/machine-id
+touch /etc/machine-id
+%end
+##### end kickstart post script #####################################
-# Cleanup dnf packages
-echo "Cleaning old yum repodata."
-dnf clean all
+
+##### begin custom post script (after base) #########################
+%post
echo "Zeroing out empty space."
# Create zeros file with nodatacow and no compression
@@ -134,11 +186,6 @@ sync /
rm -f /var/tmp/zeros
sync /
-%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
@@ -146,35 +193,4 @@ ln -s /lib/systemd/system/multi-user.target
/etc/systemd/system/default.target
echo .
%end
-
-%packages --inst-langs=en
-
-@server-product
-@core
-@headless-management
-@standard
-@networkmanager-submodules
-##@container-management
-@domain-client
-@guest-agents
-
-# All arm-tools packages install on aarch64/armhfp only
-# TODO: on a x86_64 devel environment are @arm-tools not available
-# and cause a build error.
-# @arm-tools
-
-# Standard Fedora Package Groups
-## dracut-config-generic ## included in =core=
-glibc-all-langpacks
-initial-setup
-kernel-core
--dracut-config-rescue
--generic-release*
--initial-setup-gui
--kernel
--plymouth
-# pulled in by @standard
--smartmontools
--smartmontools-selinux
-
-%end
+##### end custom post script ########################################
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.