- Kernel modules: all but hardware drivers, plus the VM and podman network drivers. - Removed: System.map, the udev hwdb, and the homed/userdbd/nsresourced units. - Job image: no translations (Locale=C.UTF-8). - systemd-oomd kills the job container that runs the VM out of memory. - gitea-runner waits for first-boot setup instead of restarting every 10s. - Tighter comments in the sysctl config; Verify=no explained in the transfers. /usr: 367 -> 307 MB, update download 317 -> 260 MB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V27snrGfdvwU7pMNBiDpHv
102 lines
3.3 KiB
Plaintext
102 lines
3.3 KiB
Plaintext
# git-runner: a Fedora VM image that runs the Gitea Actions runner, built with mkosi.
|
|
# mkosi.extra/ is copied to /, mkosi.repart/ defines the disk, mkosi.prepare adds the runner,
|
|
# mkosi.images/job/ is the job image.
|
|
|
|
[Config]
|
|
Dependencies=job
|
|
|
|
[Distribution]
|
|
Distribution=fedora
|
|
Release=45
|
|
|
|
[Output]
|
|
Format=disk
|
|
ImageId=git-runner
|
|
OutputDirectory=mkosi.output
|
|
# The UKI and /usr partitions are published as updates (systemd-sysupdate).
|
|
SplitArtifacts=uki,partitions
|
|
|
|
[Content]
|
|
Bootable=yes
|
|
# The job image (mkosi.images/job/); gitea-runner-images.service loads it at boot.
|
|
ExtraTrees=%O/job:/usr/lib/gitea-runner/job-image
|
|
Bootloader=systemd-boot
|
|
# - kernel-core no drivers or firmware beyond what VMs need
|
|
# - systemd-container systemd-pull, which systemd-sysupdate downloads with
|
|
# - systemd-boot-unsigned the bootloader
|
|
# - util-linux, shadow-utils console login and the first-boot setup
|
|
# - podman, git-core the runner's jobs; git fetches actions
|
|
# - nftables-services the firewall
|
|
# - zram-generator-defaults compressed swap in RAM
|
|
Packages=
|
|
kernel-core
|
|
systemd
|
|
dbus-broker
|
|
systemd-udev
|
|
systemd-networkd
|
|
systemd-resolved
|
|
systemd-container
|
|
systemd-boot-unsigned
|
|
util-linux
|
|
shadow-utils
|
|
podman
|
|
git-core
|
|
nftables-services
|
|
zram-generator-defaults
|
|
WithDocs=no
|
|
Locale=C.UTF-8
|
|
# The UKI's file name in the ESP, as systemd-sysupdate names the ones it installs.
|
|
UnifiedKernelImageFormat=%i_%v
|
|
# A writable root, the console on screen and serial port, no systemd-firstboot questions
|
|
# (gitea-runner-setup asks its own), and KSPP hardening (the last four).
|
|
KernelCommandLine=
|
|
rw
|
|
console=tty0
|
|
console=ttyS0,115200n8
|
|
quiet
|
|
systemd.firstboot=no
|
|
slab_nomerge
|
|
init_on_alloc=1
|
|
randomize_kstack_offset=on
|
|
page_alloc.shuffle=1
|
|
# Kernel modules in the initrd: only what finds and mounts the disks of a VM.
|
|
KernelInitrdModules=
|
|
virtio_blk
|
|
virtio_scsi
|
|
sd_mod
|
|
nvme
|
|
dm-verity
|
|
erofs
|
|
ext4
|
|
# Kernel modules in the image: all but the hardware drivers, then the drivers of a VM (disks,
|
|
# network, screen) and of podman's networks. The last matching line wins. Keyboard, USB and a
|
|
# basic screen are built into the kernel.
|
|
KernelModules=
|
|
/*
|
|
-/drivers/*
|
|
/drivers/virtio/*
|
|
/drivers/block/*
|
|
/drivers/md/*
|
|
nvme
|
|
virtio_scsi
|
|
sd_mod
|
|
virtio_net
|
|
qemu_fw_cfg
|
|
bochs
|
|
virtio-gpu
|
|
veth
|
|
tun
|
|
macvlan
|
|
ipvlan
|
|
# - System.map only for debugging the kernel
|
|
# - udev hwdb hardware names and quirks, nothing a VM needs
|
|
# - homed, userdbd, nsresourced unused services; removing their units also stops them
|
|
# on hosts installed before (/etc keeps them enabled)
|
|
RemoveFiles=
|
|
/usr/lib/modules/*/System.map
|
|
/usr/lib/udev/hwdb.bin
|
|
/usr/lib/udev/hwdb.d
|
|
/usr/lib/systemd/system/systemd-homed*
|
|
/usr/lib/systemd/system/systemd-userdbd.*
|
|
/usr/lib/systemd/system/systemd-nsresourced.*
|