From 1f1b49f3e952e8801de862004b77c088bf338525 Mon Sep 17 00:00:00 2001 From: luz Date: Wed, 30 Apr 2025 11:25:26 -0500 Subject: [PATCH] live ingredients --- ingredients/live-core-mandatory-packages.cfg | 40 +++++++++++++ ingredients/live-core-post.cfg | 63 ++++++++++++++++++++ ingredients/live-core.cfg | 12 ++++ 3 files changed, 115 insertions(+) create mode 100644 ingredients/live-core-mandatory-packages.cfg create mode 100644 ingredients/live-core-post.cfg create mode 100644 ingredients/live-core.cfg diff --git a/ingredients/live-core-mandatory-packages.cfg b/ingredients/live-core-mandatory-packages.cfg new file mode 100644 index 0000000..bdb65ba --- /dev/null +++ b/ingredients/live-core-mandatory-packages.cfg @@ -0,0 +1,40 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# What ? This kickstart file provides a basic block to build a minimal, live system + +%packages --exclude-weakdeps # Beginning of the package section. Does not include weak dependencies. Description courtesy of the Fedora project + +grub2-common.noarch +grub2-efi-ia32 +grub2-efi-x64 +grub2-efi-x64-cdboot +grub2-pc-modules.noarch +grub2-tools +grub2-tools-efi +grub2-tools-extra +grub2-tools-minimal +grubby + +# Explicitly specified here: +# walters: because otherwise dependency loops cause yum issues. +kernel +kernel-modules +kernel-modules-extra + +# Need aajohan-comfortaa-fonts for the SVG rnotes images +aajohan-comfortaa-fonts + +# Without this, initramfs generation during live image creation fails: #1242586 +dracut-live + +# anaconda needs the locales available to run for different locales +glibc-all-langpacks + +# provide the livesys scripts +livesys-scripts +%end \ No newline at end of file diff --git a/ingredients/live-core-post.cfg b/ingredients/live-core-post.cfg new file mode 100644 index 0000000..33bb568 --- /dev/null +++ b/ingredients/live-core-post.cfg @@ -0,0 +1,63 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# What ? This kickstart ingredients allows for scripts to be executed after the installation + +%post + +# Enable livesys services +systemctl enable livesys.service +systemctl enable livesys-late.service + +# enable tmpfs for /tmp +systemctl enable tmp.mount + +# make it so that we don't do writing to the overlay for things which +# are just tmpdirs/caches +# note https://bugzilla.redhat.com/show_bug.cgi?id=1135475 +cat >> /etc/fstab << EOF +vartmp /var/tmp tmpfs defaults 0 0 +EOF + +# work around for poor key import UI in PackageKit +rm -f /var/lib/rpm/__db* +echo "Packages within this LiveCD" +rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn +# Note that running rpm recreates the rpm db files which aren't needed or wanted +rm -f /var/lib/rpm/__db* + +# go ahead and pre-make the man -k cache (#455968) +/usr/bin/mandb + +# make sure there aren't core files lying around +rm -f /core* + +# remove random seed, the newly installed instance should make it's own +rm -f /var/lib/systemd/random-seed + +# convince readahead not to collect +# FIXME: for systemd + +echo 'File created by kickstart. See systemd-update-done.service(8).' \ + | tee /etc/.updated >/var/.updated + +# Drop the rescue kernel and initramfs, we don't need them on the live media itself. +# See bug 1317709 +rm -f /boot/*-rescue* + +# Disable network service here, as doing it in the services line +# fails due to RHBZ #1369794 +systemctl disable network + +# Remove machine-id on pre generated images +rm -f /etc/machine-id +touch /etc/machine-id + +# set livesys session type +sed -i 's/^livesys_session=.*/livesys_session="gnome"/' /etc/sysconfig/livesys + +%end \ No newline at end of file diff --git a/ingredients/live-core.cfg b/ingredients/live-core.cfg new file mode 100644 index 0000000..fe29e67 --- /dev/null +++ b/ingredients/live-core.cfg @@ -0,0 +1,12 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ +# +# What ? This kickstart ingredient defines the installation method for live systems + +#text # Undefine an installation mode + +poweroff # Shut down the system after a successful installation \ No newline at end of file