From f12d83b04d4913a98cc27185e8689d1ba72cf26e Mon Sep 17 00:00:00 2001 From: Lukas Date: Sun, 28 Nov 2021 18:08:35 +0100 Subject: [PATCH] new dev vm harcoded root password, no firewall, no encryption, no SELinux. carpe-diem --- blocks/dev-virtual-desktop.cfg | 19 +++++++++ blocks/dev-virtual-server.cfg | 20 ++++++++++ leaves/dev-virtual-desktop.cfg | 73 ++++++++++++++++++++++++++++++++++ leaves/dev-virtual-server.cfg | 66 ++++++++++++++++++++++++++++++ 4 files changed, 178 insertions(+) create mode 100644 blocks/dev-virtual-desktop.cfg create mode 100644 blocks/dev-virtual-server.cfg create mode 100644 leaves/dev-virtual-desktop.cfg create mode 100644 leaves/dev-virtual-server.cfg diff --git a/blocks/dev-virtual-desktop.cfg b/blocks/dev-virtual-desktop.cfg new file mode 100644 index 0000000..28ff9d0 --- /dev/null +++ b/blocks/dev-virtual-desktop.cfg @@ -0,0 +1,19 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ + +# FOR DEVELOPMENT ONLY! +# What ? This kickstart file bootstraps a desktop machine using GNOME Shell meant to be used as a virtual machine. + +# In order to be fed to virt-install or software like livecd-creator, this file needs to be flatten or merged into one. +# Here is how you can do it with the ksflatten tool provided by the pykickstart package on Fedora : +# ksflatten -c dev-virtual-desktop.cfg -o ../leaves/dev-virtual-desktop.cfg + +%include base-fedora-repo.cfg # offical repositories for Fedora +%include base-storage.cfg # base storage +%include dev-base.cfg # A minimal machine +%include base-desktop-gnome.cfg # A desktop environment +%include base-guest-agents.cfg # Guest agents \ No newline at end of file diff --git a/blocks/dev-virtual-server.cfg b/blocks/dev-virtual-server.cfg new file mode 100644 index 0000000..a3ed20d --- /dev/null +++ b/blocks/dev-virtual-server.cfg @@ -0,0 +1,20 @@ +# __ ____ ____ _____ +# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/ +# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \ +# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ / +# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/ +# /_/ /____/ +# +# FOR DEVELOPMENT ONLY! +# 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 dev-virtual-server.cfg -o ../leaves/dev-virtual-server.cfg + +%include base-fedora-repo.cfg # offical repositories for Fedora +%include base-storage.cfg # base storage +%include dev-base.cfg # A base system +%include base-guest-agents.cfg # Guest agents + +reboot --kexec # Reboot straight into the system after a successfull installation \ No newline at end of file diff --git a/leaves/dev-virtual-desktop.cfg b/leaves/dev-virtual-desktop.cfg new file mode 100644 index 0000000..decb7b8 --- /dev/null +++ b/leaves/dev-virtual-desktop.cfg @@ -0,0 +1,73 @@ +# Generated by pykickstart v3.34 +#version=DEVEL +# X Window System configuration information +xconfig --defaultdesktop=GNOME --startxonboot +# Keyboard layouts +keyboard --xlayouts='ch (fr)' +# Root password +rootpw --plaintext carpediem +# System language +lang en_US.UTF-8 +# Use text mode install +text +# Network information +network --bootproto=dhcp --device=link --hostname=phyllome-alpha --activate +# Firewall configuration +firewall --disabled +# 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 +# SELinux configuration +selinux --disabled +# 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 # Unsure it is actually useful + +%end + +%packages --exclude-weakdeps +@core +@hardware-support +dejavu-sans-mono-fonts +elementary-wallpapers-gnome.noarch +fedora-remix-logos +generic-logos +generic-release +generic-release-common +generic-release-notes +gnome-shell +gnome-terminal +mesa-dri-drivers +nano +neofetch +pciutils +qemu-guest-agent +spice-vdagent +wget +wpa_supplicant +-fedora-logos +-fedora-release +-fedora-release-common +-fedora-release-identity-basic +-fedora-release-notes +-gnome-tour + +%end diff --git a/leaves/dev-virtual-server.cfg b/leaves/dev-virtual-server.cfg new file mode 100644 index 0000000..f1bb7ce --- /dev/null +++ b/leaves/dev-virtual-server.cfg @@ -0,0 +1,66 @@ +# Generated by pykickstart v3.34 +#version=DEVEL +# Keyboard layouts +keyboard --xlayouts='ch (fr)' +# Root password +rootpw --plaintext carpediem +# 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 --disabled +# 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 +# SELinux configuration +selinux --disabled +# 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 # Unsure it is actually useful + +%end + +%packages --exclude-weakdeps +@core +@hardware-support +fedora-remix-logos +generic-logos +generic-release +generic-release-common +generic-release-notes +nano +neofetch +pciutils +qemu-guest-agent +spice-vdagent +wget +-fedora-logos +-fedora-release +-fedora-release-common +-fedora-release-identity-basic +-fedora-release-notes + +%end