make the main kickstart script leaner

Removed uncommented commands at the end
This commit is contained in:
lukas 2021-06-08 07:19:47 +00:00
parent a8c6be4e91
commit 106459b7a2

View File

@ -6,6 +6,10 @@
# /_/ /____/
# WHAT ? Kickstart file that bootstraps a minimal fedora 34 server, vanilla.
# 'v' for virtual, 's' for server, 'u' for unmodified (aka vanilla), 'b' for bios.
# USAGE : Press the `tab` key during POST and apend that after the 'quiet' string :
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/f34/vsub.cfg
# ATTENTION : this kickstart file will automatically DESTROY the main virtual disk 'vda' and all of its contents.
# Bye bye!
@ -15,9 +19,6 @@
# Do something like virt-sysprep --root-password password: -a thenameofyourdiskimage.img.
# Your password must be added after the semicolon ":". See here for more information : https://libguestfs.org/virt-sysprep.1.html
# USAGE : Press the `tab` key during POST and apend that after the 'quiet' string :
# inst.ks=https://git.phyllo.me/home/kickstart/raw/branch/master/f34/main.cfg
# REQUIRES :
# - Requires a 3GB disk image (tested with QCOW2, may works with most virtio-based storage)
# - Expects a BIOS-based virtual machine (no-EFI support). There will be a kickstart file for that (tm)
@ -124,6 +125,8 @@ part / --fstype="ext4" --ondisk=vda --grow --label=system
@^server-product-environment
%end
## POST-INSTALLATION SCRIPTS ##
## Start of the %post section with logging into /root/ks-post.log
%post --log=/root/ks-post.log
@ -136,53 +139,9 @@ part / --fstype="ext4" --ondisk=vda --grow --label=system
# Update the system
dnf update -y
## Remove the Headless Management group, which provides Cockpit, and that we don't need
# dnf groupremove -y "Headless Management"
## Remove the Hardware Support group, which provides extra-hardware support beyond linux-firmware
# dnf groupremove -y "Hardware Support"
## Install dejavu mono fonts. For some reason
# dnf install -y dejavu-sans-mono-fonts
## Install the desktop environment, a terminal and a web browser. Uncomment for VM
# dnf install -y gnome-shell gnome-terminal firefox
## WPA Supplicant for Linux. Not integrated by default in gnome-shell. Not useful for virtual machine
# dnf install -y wpa_supplicant
## Set the desktop environment as the default target with systemd. Uncomment for graphical system
# systemctl set-default graphical.target
## We also need to install a qemu and spice guest agents, respectively to allow a better support for spice and the ability for the host to better interact with the guest
## We also need to install a qemu guest agent, to allow the host to better interact with the guest
dnf install -y spice-vdagent qemu-guest-agent
# Install virtualization-related utilites, including virt-manager. Only useful for desktop system
# dnf groupinstall -y Virtualization
# Install wallpapers in gnome. Only useful for Gnome
# dnf install -y elementary-wallpapers-gnome.noarch
## make user "test" part of the existing libvirt group. It will allow this user to interact with the hypervisor. Will take effect after a logout
# usermod -a -G libvirt test
# load kernel modules in grub. Add `intel_iommu=on intel_iommu=pt` for intel processors, `amd_iommu=on` for amd processors. Add `i915.enable_guc=0` too.
# See here for explanation : # See here : https://wiki.archlinux.org/title/Intel_graphics#Enable_GuC_/_HuC_firmware_loading. Only useful for nested virtualization
# sed -i 's/\(quiet\)/\1 intel_iommu=on/i' /etc/default/grub
#
# sed -i 's/\(intel_iommu=on\)/\1 intel_iommu=pt/i' /etc/default/grub
# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd, kvmgt, vfio-mdev. Only useful for nested-virtualization
# echo "vfio" > /etc/modules-load.d/vfio.conf
# echo "vfio-pci" > /etc/modules-load.d/vfio-pci.conf
# echo "vfio_iommu_type1" > /etc/modules-load.d/vfio_iommu_type1.conf
# echo "vfio_virqfd" > /etc/modules-load.d/vfio_virqfd.conf
# echo "kvmgt" > /etc/modules-load.d/kvmgt.conf
# echo "vfio-mdev" > /etc/modules-load.d/vfio-mdev.conf
# set the GRUB_TIMEOUT countdown to 1 instead of 5 seconds.
sed -i 's/5/1/' /etc/default/grub