From e14f5376a143365d5a1b3c5b3871e38e2f6bbb78 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sat, 27 Nov 2021 10:52:58 +0100 Subject: [PATCH] add virtual server model --- blocks/virtual-server.cfg | 26 +++++++++++++++ leaves/virtual-server.cfg | 69 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 blocks/virtual-server.cfg create mode 100644 leaves/virtual-server.cfg diff --git a/blocks/virtual-server.cfg b/blocks/virtual-server.cfg new file mode 100644 index 0000000..43c389c --- /dev/null +++ b/blocks/virtual-server.cfg @@ -0,0 +1,26 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ +# +# What ? When flattened, this file will result in a stand-alone kickstart file that can be automatically deploy into a server-oriented system. + +# In order to be fed to virt-install or a software like livecd-creator, this file needs to be flattened. +# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : +# ksflatten -c server.cfg -o ../leaves/flat-server.cfg + +%include base-fedora-repo.cfg # offical repositories for Fedora +%include base-storage.cfg # base storage +%include base.cfg # A base system +%include base-guest-agents.cfg # Guest agents + +firstboot --enable --reconfig # Initial Setup will start after the first reboot +reboot --kexec # Reboot straight into the system after a successfull installation + +%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies. + +initial-setup # Install the initial setup package. + +%end # End of the packages section \ No newline at end of file diff --git a/leaves/virtual-server.cfg b/leaves/virtual-server.cfg new file mode 100644 index 0000000..546c9c5 --- /dev/null +++ b/leaves/virtual-server.cfg @@ -0,0 +1,69 @@ +# Generated by pykickstart v3.34 +#version=DEVEL +# Keyboard layouts +keyboard --xlayouts='ch (fr)' +# Root password +rootpw --iscrypted --lock locked +# System language +lang en_US.UTF-8 +# Reboot after installation +reboot --kexec +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --hostname=phyllome-alpha --activate +# Firewall configuration +firewall --enabled --service=mdns +# Use network installation +url --mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch" +repo --name="fedora" --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch +repo --name="updates" --mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f$releasever&arch=$basearch +# System timezone +timezone Europe/Paris --utc +# Run the Setup Agent on first boot +firstboot --reconfig +# SELinux configuration +selinux --enforcing +# System services +services --disabled="sshd" --enabled="NetworkManager" +# System bootloader configuration +bootloader --location=mbr --timeout=1 +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +# Disk partitioning information +part /boot/efi --fstype="efi" --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi +part /boot --fstype="ext4" --size=384 --label=boot +part / --fstype="ext4" --grow --label=root + +%post --logfile=/root/b.log + +localectl set-keymap ch-fr # Set keymap to `ch-fr`. Alternatively, `us` can be picked. +dnf update -y # Update the system +grub2-mkconfig -o /boot/grub2/grub.cfg # Usure it is actually useful + +%end + +%packages --exclude-weakdeps +@core +@hardware-support +fedora-remix-logos +generic-logos +generic-release +generic-release-common +generic-release-notes +initial-setup +nano +neofetch +pciutils +qemu-guest-agent +spice-vdagent +wget +-fedora-logos +-fedora-release +-fedora-release-common +-fedora-release-identity-basic +-fedora-release-notes + +%end