Code refactor and update of the live system image

This commit is contained in:
lukas 2022-01-24 20:05:22 +01:00
parent bfc2abc3d1
commit ec1499d2e8
2 changed files with 28 additions and 39 deletions

View File

@ -0,0 +1,10 @@
# __ ____ ____ _____
# ____ / /_ __ __/ / /___ ____ ___ ___ / __ \/ ___/
# / __ \/ __ \/ / / / / / __ \/ __ `__ \/ _ \ / / / /\__ \
# / /_/ / / / / /_/ / / / /_/ / / / / / / __/ / /_/ /___/ /
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# What ? This kickstart file provides a basic partition layout for live systems, without encryption.
part / --size 5120 # Create a root partition of around 5GB

View File

@ -5,49 +5,28 @@
# / .___/_/ /_/\__, /_/_/\____/_/ /_/ /_/\___/ \____//____/
# /_/ /____/
# What ? This kickstart file bootstraps a live desktop hypervisor machine.
# What ? This kickstart file contains the recipe to bootstrap a live desktop hypervisor 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 live-desktop-hypervisor.cfg -o ../dishes/phyllome-desktop-live.cfg
# IMPORTANT : Weak dependencies to be destroyed in the resulting ks
# This file needs to be flattened: flattening is like cooking ingredients in a specific order to make a dish.
# You can do that with the ksflatten tool provided by the pykickstart package on Fedora :
# ksflatten -c live-desktop-hypervisor.cfg -o ../dishes/live-phyllome-desktop.cfg
# Instructions for livecd-creator (about to be deprecated)
# An ISO file can be created using the following command as *root*:
# livecd-creator -c ../leaves/phyllome-desktop-live.cfg --fslabel=phyllome-desktop-live
# livecd-creator is part of the livecd-tools package
# Instructions for livemedia-creator
# An ISO file can be created using the following command as *root*:
# livemedia-creator --make-iso --ks phyllome-desktop-live.cfg --no-virt --iso-only --iso-name phyllome-desktop-live-x86_64.iso --releasever 35
# Instructions for creating an ISO file
# Temporary disable SELinux:
# setenforce 0
# Use the following command to create an ISO file, as the root user:
# livemedia-creator --make-iso --ks ../dishes/live-phyllome-desktop.cfg --no-virt --iso-only --iso-name phyllome-desktop-x86_64.iso --releasever 35
# The resulting ISO can be tested with qemu-kvm, using the following these two commands, as *root*:
# UEFI test:
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-desktop-live-x86_64.iso
# qemu-kvm -bios /usr/share/edk2/ovmf/OVMF_CODE.fd -m 2048 -vga qxl phyllome-desktop-x86_64.iso
# BIOS test:
# qemu-kvm -m 2048 -vga qxl phyllome-desktop-live-x86_64.iso
# qemu-kvm -m 2048 -vga qxl phyllome-desktop-x86_64.iso
%include ../ingredients/live-desktop.cfg # A base for a live desktop minimal machine
%include ../ingredients/base-live-hypervisor.cfg # A base hypervisor
%packages --exclude-weakdeps # Beginning of the packages section. Do not include weak dependencies.
virt-manager # Install virt-manager, the graphical front-end for QEMU/KVM
%end # End of the packages section
%post --log=/root/ldh.log # Beginning of %post section. Those commands are executed outside the chroot environment. Add logging.
usermod -a -G libvirt liveuser # Make user "liveuser" part of the existing libvirt group to allow it to interact with the guest-hypervisor.
chown liveuser:liveuser /var/lib/libvirt/iso # Make the user "liveuser" the owner of this directory
chown liveuser:liveuser /var/lib/libvirt/images # Make the user "test" the owner of this directory
# Create a file to autostart virt-manager
cat > /etc/xdg/autostart/virt-manager.desktop << EOF
[Desktop Entry]
Type=Application
Name=Virtual Machine Manager
Exec=virt-manager
EOF
%end # End of the %post section
%include ../ingredients/base-fedora-repo.cfg # offical repositories for Fedora
%include ../ingredients/base-storage-live.cfg # a base storage for live systems
%include ../ingredients/base-live.cfg # A minimal base for live systems
%include ../ingredients/base-desktop-gnome.cfg # A desktop environment based on GNOME Shell
%include ../ingredients/base-desktop-virtual-machine-manager.cfg # the virtual machine manager
%include ../ingredients/base-live-desktop-quirks.cfg # Some live-related quirks
%include ../ingredients/base-hypervisor.cfg # A base hypervisor