diff --git a/dishes/live-desktop-hypervisor.cfg b/dishes/live-desktop-hypervisor.cfg index 98b8a05..3991d6a 100644 --- a/dishes/live-desktop-hypervisor.cfg +++ b/dishes/live-desktop-hypervisor.cfg @@ -283,7 +283,9 @@ echo "vfio-mdev" > /mnt/sysimage/etc/modules-load.d/vfio-mdev.conf # Load specif %end %packages --exclude-weakdeps +@anaconda-tools NetworkManager +NetworkManager-config-connectivity-fedora NetworkManager-wifi aajohan-comfortaa-fonts alsa-sof-firmware @@ -382,20 +384,11 @@ virt-top wget2 wpa_supplicant zram-generator-defaults --@dial-up --@input-methods --@standard --device-mapper-multipath --fcoe-utils -fedora-logos -fedora-release -fedora-release-common -fedora-release-identity-basic -fedora-release-notes --gfs2-utils -gnome-tour --python3-botocore --reiserfs-utils --sdubby %end diff --git a/dishes/live-desktop.cfg b/dishes/live-desktop.cfg index e08069a..7c16848 100644 --- a/dishes/live-desktop.cfg +++ b/dishes/live-desktop.cfg @@ -179,7 +179,9 @@ glib-compile-schemas /mnt/sysimage/usr/share/glib-2.0/schemas/ %end %packages --exclude-weakdeps +@anaconda-tools NetworkManager +NetworkManager-config-connectivity-fedora NetworkManager-wifi aajohan-comfortaa-fonts alsa-sof-firmware @@ -268,20 +270,11 @@ vim-minimal wget2 wpa_supplicant zram-generator-defaults --@dial-up --@input-methods --@standard --device-mapper-multipath --fcoe-utils -fedora-logos -fedora-release -fedora-release-common -fedora-release-identity-basic -fedora-release-notes --gfs2-utils -gnome-tour --python3-botocore --reiserfs-utils --sdubby %end diff --git a/dishes/live-server-hypervisor.cfg b/dishes/live-server-hypervisor.cfg new file mode 100644 index 0000000..6f377da --- /dev/null +++ b/dishes/live-server-hypervisor.cfg @@ -0,0 +1,206 @@ +# Generated by pykickstart v3.62 +#version=DEVEL +# Firewall configuration +firewall --disabled +# Run the Setup Agent on first boot +firstboot --reconfig +# Keyboard layouts +keyboard --xlayouts='ch (fr)' +# System language +lang en_US.UTF-8 +# Network information +network --bootproto=dhcp --device=link --hostname=phyllome-alpha --activate +# Shutdown after installation +shutdown +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 +# Root password +rootpw --iscrypted --lock locked +# SELinux configuration +selinux --disabled +# System services +services --enabled="NetworkManager,libvirtd" +# System timezone +timezone Europe/Paris --utc +# Use network installation +url --mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch" +# System bootloader configuration +bootloader --location=mbr --timeout=1 +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +# Disk partitioning information +part / --fstype="ext4" --size=5120 +part / --size=8576 + +%post --logfile=/mnt/sysimage/root/post.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 + +%post --logfile=/mnt/sysimage/root/post.log + +# Enable livesys services +systemctl enable livesys.service +systemctl enable livesys-late.service + +# enable tmpfs for /tmp +systemctl enable tmp.mount + +# make it so that we don't do writing to the overlay for things which +# are just tmpdirs/caches +# note https://bugzilla.redhat.com/show_bug.cgi?id=1135475 +cat >> /etc/fstab << EOF +vartmp /var/tmp tmpfs defaults 0 0 +EOF + +# work around for poor key import UI in PackageKit +rm -f /var/lib/rpm/__db* +echo "Packages within this LiveCD" +rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn +# Note that running rpm recreates the rpm db files which aren't needed or wanted +rm -f /var/lib/rpm/__db* + +# go ahead and pre-make the man -k cache (#455968) +/usr/bin/mandb + +# make sure there aren't core files lying around +rm -f /core* + +# remove random seed, the newly installed instance should make it's own +rm -f /var/lib/systemd/random-seed + +# convince readahead not to collect +# FIXME: for systemd + +echo 'File created by kickstart. See systemd-update-done.service(8).' \ + | tee /etc/.updated >/var/.updated + +# Drop the rescue kernel and initramfs, we don't need them on the live media itself. +# See bug 1317709 +rm -f /boot/*-rescue* + +# Disable network service here, as doing it in the services line +# fails due to RHBZ #1369794 +systemctl disable network + +# Remove machine-id on pre generated images +rm -f /etc/machine-id +touch /etc/machine-id + +%end + +%post --nochroot --logfile=/mnt/sysimage/opt/base-hypervisor.log + +# Load kernel modules by adding vfio, vfio_pci, vfio_iommu_type1, vfio_virqfd +echo "vfio" > /mnt/sysimage/etc/modules-load.d/vfio.conf +echo "vfio-pci" > /mnt/sysimage/etc/modules-load.d/vfio-pci.conf +echo "vfio_iommu_type1" > /mnt/sysimage/etc/modules-load.d/vfio_iommu_type1.conf +echo "vfio_virqfd" > /mnt/sysimage/etc/modules-load.d/vfio_virqfd.conf + +mkdir /mnt/sysimage/var/lib/libvirt/isos # Create a directory to store iso images. SELinux is already taking this one into account. + +# wget https://boot.netboot.xyz/ipxe/netboot.xyz.iso -P /mnt/sysimage/var/lib/libvirt/isos/ # fetch netboot.xyz iso and store it to the newly created iso directory + +# # virsh commands fail in a kickstart environment (chroot or not it seems). would need to fetch a script and execute post-launch with a delay, for example using a systemd unit +# virsh pool-define-as isos dir - - - - /mnt/sysimage/var/lib/libvirt/isos/ # Make libvirt aware of this new directory by creating a so-called 'pool'. +# virsh pool-build isos # Build the pool +# virsh pool-start isos # Start it +# virsh pool-autostart isos # Set-it to autostart + +# fetch custom script and make it executable +# wget https://raw.githubusercontent.com/PhyllomeOS/phyllomeos/main/post-first-startup-scripts/virtualization-tweaks-root-needed.sh -P /mnt/sysimage/usr/local/bin/ +# chmod +x /mnt/sysimage/usr/local/bin/virtualization-tweaks-root-needed.sh + +# wget https://raw.githubusercontent.com/PhyllomeOS/xml-definition-for-domains/main/xml/system/linux.xml +# virsh define linux.xml + +# wget https://raw.githubusercontent.com/PhyllomeOS/xml-definition-for-domains/main/xml/system/windows.xml +# virsh define windows.xml + +%end + +%packages --exclude-weakdeps +@anaconda-tools +NetworkManager +NetworkManager-config-connectivity-fedora +aajohan-comfortaa-fonts +audit +basesystem +bash +coreutils +curl +dhcp-client +dnf5 +dnf5-plugins +dracut +dracut-config-rescue +dracut-live +e2fsprogs +fedora-remix-logos +filesystem +firewalld +fwupd +generic-logos +generic-release +generic-release-common +generic-release-notes +glibc +glibc-all-langpacks +guestfs-tools +hostname +initial-setup +iproute +iputils +kbd +kernel +kernel-modules +kernel-modules-extra +less +libguestfs-tools +libusb1 +libvirt +libvirt-daemon-config-network +libvirt-daemon-kvm +livesys-scripts +man-db +nano +ncurses +openssh-clients +openssh-server +parted +pciutils +plymouth +policycoreutils +prefixdevname +procps-ng +python3-libguestfs +qemu-kvm +rootfiles +rpm +selinux-policy-targeted +setup +shadow-utils +sssd-common +sssd-kcm +sudo +systemd +systemd-resolved +usbutils +util-linux +vim-minimal +virt-install +virt-top +wget2 +zram-generator-defaults +-fedora-logos +-fedora-release +-fedora-release-common +-fedora-release-identity-basic +-fedora-release-notes + +%end diff --git a/dishes/live-server.cfg b/dishes/live-server.cfg new file mode 100644 index 0000000..3fddfa6 --- /dev/null +++ b/dishes/live-server.cfg @@ -0,0 +1,159 @@ +# Generated by pykickstart v3.62 +#version=DEVEL +# Firewall configuration +firewall --disabled +# Run the Setup Agent on first boot +firstboot --reconfig +# Keyboard layouts +keyboard --xlayouts='ch (fr)' +# System language +lang en_US.UTF-8 +# Network information +network --bootproto=dhcp --device=link --hostname=phyllome-alpha --activate +# Shutdown after installation +shutdown +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 +# Root password +rootpw --iscrypted --lock locked +# SELinux configuration +selinux --disabled +# System services +services --enabled="NetworkManager,systemd-resolved" +# System timezone +timezone Europe/Paris --utc +# Use network installation +url --mirrorlist="https://mirrors.fedoraproject.org/mirrorlist?repo=fedora-$releasever&arch=$basearch" +# System bootloader configuration +bootloader --location=none --timeout=1 +# Clear the Master Boot Record +zerombr +# Partition clearing information +clearpart --all --initlabel +# Disk partitioning information +part / --fstype="ext4" --size=5120 +part / --size=8576 + +%post --logfile=/mnt/sysimage/root/post.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 + +%post --logfile=/mnt/sysimage/root/post.log + +# Enable livesys services +systemctl enable livesys.service +systemctl enable livesys-late.service + +# enable tmpfs for /tmp +systemctl enable tmp.mount + +# make it so that we don't do writing to the overlay for things which +# are just tmpdirs/caches +# note https://bugzilla.redhat.com/show_bug.cgi?id=1135475 +cat >> /etc/fstab << EOF +vartmp /var/tmp tmpfs defaults 0 0 +EOF + +# work around for poor key import UI in PackageKit +rm -f /var/lib/rpm/__db* +echo "Packages within this LiveCD" +rpm -qa --qf '%{size}\t%{name}-%{version}-%{release}.%{arch}\n' |sort -rn +# Note that running rpm recreates the rpm db files which aren't needed or wanted +rm -f /var/lib/rpm/__db* + +# go ahead and pre-make the man -k cache (#455968) +/usr/bin/mandb + +# make sure there aren't core files lying around +rm -f /core* + +# remove random seed, the newly installed instance should make it's own +rm -f /var/lib/systemd/random-seed + +# convince readahead not to collect +# FIXME: for systemd + +echo 'File created by kickstart. See systemd-update-done.service(8).' \ + | tee /etc/.updated >/var/.updated + +# Drop the rescue kernel and initramfs, we don't need them on the live media itself. +# See bug 1317709 +rm -f /boot/*-rescue* + +# Disable network service here, as doing it in the services line +# fails due to RHBZ #1369794 +systemctl disable network + +# Remove machine-id on pre generated images +rm -f /etc/machine-id +touch /etc/machine-id + +%end + +%post + +# set livesys session type +sed -i 's/^livesys_session=.*/livesys_session="gnome"/' /etc/sysconfig/livesys + +%end + +%packages --exclude-weakdeps +@anaconda-tools +aajohan-comfortaa-fonts +audit +basesystem +bash +coreutils +curl +dhcp-client +dnf5 +dracut +dracut-live +e2fsprogs +fedora-remix-logos +filesystem +generic-logos +generic-release +generic-release-common +generic-release-notes +glibc +glibc-all-langpacks +hostname +initial-setup +iproute +iputils +kbd +kernel +kernel-modules +kernel-modules-extra +less +livesys-scripts +man-db +ncurses +openssh-clients +openssh-server +parted +policycoreutils +procps-ng +rootfiles +rpm +selinux-policy-targeted +setup +shadow-utils +sssd-common +sssd-kcm +sudo +systemd +util-linux +vim-minimal +-fedora-logos +-fedora-release +-fedora-release-common +-fedora-release-identity-basic +-fedora-release-notes + +%end