phyllomeos/README.md
2025-04-22 16:03:14 -05:00

7.5 KiB

Phyllome OS

Phyllome OS is a Fedora Remix designed to leverage hardware-assisted virtualization and paravirtualization to make it easier to run virtualized operating systems locally.

Phyllome OS uses the automated kickstart installation method to deploy itself to a specific target computer or virtual machine.

Phyllome OS is in its alpha stage of development. Expect bugs and disappointment

The content of this repository

Each version of Phyllome OS is like a dish that is based on a recipe that lists ingredients, or basic building blocks for assembling Phyllome OS and other derivatives.

  • ingredients🥑 🥥 🥭 🥝 🥦 🥬 🥒 🧄: Each ingredient represents a feature or a set of integrated features, such as a specific Desktop Environment

Example for the base storage ingredient used by Phyllome OS.

cat ingredients/base-storage.cfg

[...]
# What ? This kickstart file provides a basic ext4 unencrypted partition layout for UEFI-based systems

part /boot/efi --fstype="efi" --size=128 --fsoptions="umask=0077,shortname=winnt" --label=efi # Will create an EFI system partitition of 128 MiB (vda1)
part /boot --fstype="ext4" --size=512 --label=boot # Create a boot partition of 512 MiB using the ext4 filesystem (vda2)
part / --fstype="ext4" --grow --label=root # The remaining space will be used for root (vda3)
  • recipes🧾 🧩: this directory contains recipes for deploying operating system artifacts on bare-metal, as a live system, or inside a virtual machine.

Let's take a look at the recipe to deploy Phyllome OS Desktop.

cat recipes/desktop-hypervisor.cfg

# What ? This kickstart file bootstraps a desktop hypervisor.

[...]

%include ../ingredients/base-fedora-repo.cfg # offical repositories for Fedora
%include ../ingredients/base-storage.cfg # base storage
%include ../ingredients/base.cfg # A minimal machine
%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-hypervisor.cfg # A base hypervisor
%include ../ingredients/base-initial-setup-gnome.cfg # Includes initial-setup for GNOME Shell, allowing for the creation of a user after the first boot, as well as some basic configuration
  • dishes🥨 🥐 🥖 🥧 🥞 🥯 🧆 🧁...: the end-product in the form of stand-alone and ready-to-consume kickstart file

Let's take a look at the final Phyllome OS Desktop dish.

cat dishes/desktop-hypervisor.cfg

# Generated by pykickstart v3.58
#version=DEVEL
# Use text mode install
text
# Firewall configuration
firewall --enabled --service=mdns
# Keyboard layouts
keyboard --xlayouts='ch (fr)'
# System language
lang en_US.UTF-8
# Network information

[...]

%end

%packages --exclude-weakdeps
@core
@hardware-support
NetworkManager-wifi
dejavu-sans-mono-fonts
fedora-remix-logos
firefox
generic-logos
generic-release
generic-release-common
generic-release-notes
gnome-backgrounds.noarch
gnome-initial-setup
gnome-shell
gnome-terminal
guestfs-tools
libguestfs-tools
libusb
libvirt
libvirt-daemon-config-network
libvirt-daemon-kvm
mesa-dri-drivers
mozilla-ublock-origin.noarch
nano
pciutils
python3-libguestfs
qemu-kvm
usbutils
virt-install
virt-manager
virt-top
wget
wpa_supplicant
-fedora-logos
-fedora-release
-fedora-release-common
-fedora-release-identity-basic
-fedora-release-notes
-gnome-tour

%end

Development

Let's assume you wish to add Luanti, a free and open-source sandbox video game engine, as an ingredient to a dish.

  • Clone this repository and move inside:
$ git clone https://git.phyllo.me/roots/phyllomeos && cd phyllomeos
  • Make a copy of the template.cfg file and rename it
$ cp ingredients/template.cfg ingredients/extra-luanti.cfg
  • Add software luanti to your file:
$ nano ingredients/extra-luanti.cfg
# What ? This partial kickstart file provides the video game Luanti

%packages --exclude-weakdeps # Beginning of the packages section. Excludes weak package dependencies

luanti # a free and open-source sandbox video game

%end
  • Navigate inside the recipes folder:
$ cd recipes
  • Pick a suitable recipe to add your ingredient to it. As luanti is a GUI application, virtual-desktop.cfg is a fitting candidate. Make a copy of it.
$ cp virtual-desktop.cfg virtual-desktop-lunanti.cfg
  • Edit the file and add the newly defined ingredient:
$ nano virtual-desktop-luanti.cfg
%include ../ingredients/base-fedora-repo.cfg # offical repositories for Fedora
%include ../ingredients/base-storage.cfg # base storage
%include ../ingredients/base.cfg # A minimal machine
%include ../ingredients/base-desktop-gnome.cfg # A desktop environment
%include ../ingredients/base-guest-agents.cfg # Guest agents
%include ../ingredients/base-initial-setup-gnome.cfg # Includes initial-setup for GNOME Shell, allowing for the creation of a user after the first boot, as well as some basic configuration

%include ../ingredients/extra-luanti.cfg # A free and open-source sandbox video game

poweroff # Shut down the system after a successful installation
  • Merge the kickstart basic building blocks a single file, or dish. This process is called 'flattening'.
$ ksflatten -c virtual-desktop-lunanti.cfg -o ../dishes/virtual-desktop-luanti.cfg

If any errors are detected, go back and fix them.

If multiple dishes are affected by your ingredients, flatten them all while in the recipes folder.

for filename in *.cfg; do ksflatten -c "$filename" -o "../dishes/$filename"; done
  • Navigate inside the dishes folder:
$ cd ../dishes/
  • You can then kickstart your own installation:
# virt-install \
    --connect qemu:///system \
    --metadata description="Phyllome OS Desktop, virtual edition, with Luanti" \
    --os-variant fedora41 \
    --virt-type kvm \
    --arch x86_64 \
    --machine q35 \
    --name virtual-desktop-luanti \
    --boot uefi \
    --cpu host-model,topology.sockets=1,topology.cores=2,topology.threads=1 \
    --vcpus 2 \
    --memory 4096 \
    --video virtio \
    --graphics spice,listen=none \
    --channel spicevmc \
    --autoconsole none \
    --console pty,target.type=virtio \
    --sound none \
    --network type=user,model=virtio \
    --controller type=virtio-serial \
    --controller type=usb,model=none \
    --controller type=scsi,model=virtio-scsi \
    --input type=keyboard,bus=virtio \
    --input type=tablet,bus=virtio \
    --rng /dev/urandom,model=virtio \
    --disk path=/var/lib/libvirt/images/virtual-phyllome-desktop.img,format=raw,bus=virtio,cache=writeback,size=5 \
    --location=https://download.fedoraproject.org/pub/fedora/linux/releases/42/Everything/x86_64/os/ \
    --initrd-inject virtual-desktop-luanti.cfg --extra-args "inst.ks=file:virtual-desktop-luanti.cfg"

Acknowledgement

Thanks to the main contributors of the official Fedora kickstart files repository, and related tools:

Adam Miller, Bastien Nocera, Bruno Wolff III, Bryan Kearney, Chitlesh Goorah, Christoph Wickert, Colin Walters, Fabian Affolter, Igor Pires Soares, Jens Petersen, Jeremy Katz, Jeroen van Meeuwen Jesse Keating, Luya Tshimbalanga, Matthias Clasen, Pedro Silva, Rahul Sundaram, Sebastian Dziallas Sebastian Vahl, wart. More information here : https://pagure.io/fedora-kickstarts