124 lines
4.1 KiB
Diff
124 lines
4.1 KiB
Diff
From abb56223e0a35c3e5d1158f32789c44c28bacf40 Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Sat, 24 May 2025 13:27:00 +0100
|
|
Subject: [PATCH] builder: Build fedora-42 template
|
|
|
|
Thanks: Jeff Layton
|
|
---
|
|
builder/templates/fedora-42.index-fragment | 22 +++++++++
|
|
builder/templates/fedora-42.ks | 48 ++++++++++++++++++++
|
|
builder/templates/fedora-42.virt-install-cmd | 20 ++++++++
|
|
3 files changed, 90 insertions(+)
|
|
create mode 100644 builder/templates/fedora-42.index-fragment
|
|
create mode 100644 builder/templates/fedora-42.ks
|
|
create mode 100644 builder/templates/fedora-42.virt-install-cmd
|
|
|
|
diff --git a/builder/templates/fedora-42.index-fragment b/builder/templates/fedora-42.index-fragment
|
|
new file mode 100644
|
|
index 000000000..6d21b742c
|
|
--- /dev/null
|
|
+++ b/builder/templates/fedora-42.index-fragment
|
|
@@ -0,0 +1,22 @@
|
|
+[fedora-42]
|
|
+name=Fedora® 42 Server
|
|
+osinfo=fedora42
|
|
+arch=x86_64
|
|
+file=fedora-42.xz
|
|
+checksum[sha512]=dda921f3c522da8d8a67e31948260f52a9aa5bdeca4382a5c557635d77ad91d11b9aded70a225f59503b268ec73815ceac2eac5b70c1d47f22056febdd9da6bb
|
|
+format=raw
|
|
+size=6442450944
|
|
+compressed_size=927728896
|
|
+expand=/dev/sda3
|
|
+notes=Fedora® 42 Server
|
|
+
|
|
+ This Fedora image contains only unmodified @Core group packages.
|
|
+
|
|
+ Fedora and the Infinity design logo are trademarks of Red Hat, Inc.
|
|
+ Source and further information is available from http://fedoraproject.org/
|
|
+
|
|
+ This template was generated by a script in the libguestfs source tree:
|
|
+ builder/templates/make-template.ml
|
|
+ Associated files used to prepare this template can be found in the
|
|
+ same directory.
|
|
+
|
|
diff --git a/builder/templates/fedora-42.ks b/builder/templates/fedora-42.ks
|
|
new file mode 100644
|
|
index 000000000..17e2e3f15
|
|
--- /dev/null
|
|
+++ b/builder/templates/fedora-42.ks
|
|
@@ -0,0 +1,48 @@
|
|
+# Kickstart file for fedora-42
|
|
+# Generated by libguestfs.git/builder/templates/make-template.ml
|
|
+
|
|
+text
|
|
+reboot
|
|
+lang en_US.UTF-8
|
|
+keyboard us
|
|
+network --bootproto dhcp
|
|
+rootpw builder
|
|
+firewall --enabled --ssh
|
|
+timezone --utc America/New_York
|
|
+selinux --enforcing
|
|
+
|
|
+bootloader --location=mbr --append="console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH"
|
|
+
|
|
+
|
|
+zerombr
|
|
+clearpart --all --initlabel --disklabel=gpt
|
|
+autopart --type=plain
|
|
+
|
|
+# Halt the system once configuration has finished.
|
|
+poweroff
|
|
+
|
|
+%packages
|
|
+@core
|
|
+%end
|
|
+
|
|
+%post
|
|
+# Ensure the installation is up-to-date.
|
|
+dnf -y --best upgrade
|
|
+# This required otherwise the kernel will not be bootable, see
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=1911177
|
|
+# https://bugzilla.redhat.com/show_bug.cgi?id=1945835#c24
|
|
+grub2-mkconfig -o '/etc/grub2.cfg'
|
|
+# Enable Xen domU support.
|
|
+pushd /etc/dracut.conf.d
|
|
+echo 'add_drivers+=" xen:vbd xen:vif "' > virt-builder-xen-drivers.conf
|
|
+popd
|
|
+# To make dracut config changes permanent, we need to rerun dracut.
|
|
+# Rerun dracut for the installed kernel (not the running kernel).
|
|
+# See commit 0fa52e4e45d80874bc5ea5f112f74be1d3f3472f and
|
|
+# https://www.redhat.com/archives/libguestfs/2014-June/thread.html#00045
|
|
+KERNEL_VERSION="$(rpm -q kernel --qf '%{version}-%{release}.%{arch}\n' |
|
|
+ sort -V | tail -1)"
|
|
+dracut -f /boot/initramfs-$KERNEL_VERSION.img $KERNEL_VERSION
|
|
+%end
|
|
+
|
|
+# EOF
|
|
diff --git a/builder/templates/fedora-42.virt-install-cmd b/builder/templates/fedora-42.virt-install-cmd
|
|
new file mode 100644
|
|
index 000000000..2a3256bbd
|
|
--- /dev/null
|
|
+++ b/builder/templates/fedora-42.virt-install-cmd
|
|
@@ -0,0 +1,20 @@
|
|
+# This is the virt-install command which was used to create
|
|
+# the virt-builder template 'fedora-42'
|
|
+# NB: This file is generated for documentation purposes ONLY!
|
|
+# This script was never run, and is not intended to be run.
|
|
+
|
|
+'virt-install' \
|
|
+ '--transient' \
|
|
+ '--name=tmp-oeg15xnl' \
|
|
+ '--ram=4096' \
|
|
+ '--arch=x86_64' \
|
|
+ '--cpu=host' \
|
|
+ '--vcpus=4' \
|
|
+ '--os-variant=fedora34' \
|
|
+ '--initrd-inject=fedora-42.ks' \
|
|
+ '--extra-args=inst.ks=file:/fedora-42.ks console=tty0 console=ttyS0,115200 rd_NO_PLYMOUTH' \
|
|
+ '--disk=/home/rjones/d/guestfs-tools/builder/templates/tmp-oeg15xnl.img,size=6,format=raw' \
|
|
+ '--location=https://lon.mirror.rackspace.com/fedora/releases/42/Server/x86_64/os/' \
|
|
+ '--serial=pty' \
|
|
+ '--nographics'
|
|
+
|