From 8bebf5425cb468cfefb804259bdf686ee1ba88d7 Mon Sep 17 00:00:00 2001 From: mendezr Date: Fri, 18 Sep 2026 18:30:19 +0000 Subject: [PATCH] fix(installer): stop root-a growth from starving the /var partition The installer-test 'Install and boot in QEMU' gate fails on main: the second boot drops to emergency mode waiting for /dev/disk/by-partlabel/var. Both 'GrowFileSystem=yes' partitions (root-a and var) split the leftover disk space by default weight, but 20-root-a.conf allowed root-a to grow up to SizeMaxBytes=16G (the full 16G test disk). Depending on the DDI payload's footprint, root-a's elastic growth could consume the space /var needs, so var is never created (or is undersized) and the var.mount unit times out. Bound root-a's SizeMaxBytes to a realistic OS-payload size (8G) instead of the full test-disk size, and give /var an explicit high Weight= so it always retains a dominant share of the leftover space and its SizeMinBytes=4G regardless of how far root-a grows. /var remains the tail partition that grows to fill the disk. Assisted-by: DeepSeek via GitHub Copilot Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mendezr --- files/installer/repart.d/20-root-a.conf | 7 ++++++- files/installer/repart.d/30-var.conf | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/files/installer/repart.d/20-root-a.conf b/files/installer/repart.d/20-root-a.conf index b10319bd..3702bd77 100644 --- a/files/installer/repart.d/20-root-a.conf +++ b/files/installer/repart.d/20-root-a.conf @@ -2,10 +2,15 @@ # systemd-repart copies the DDI payload block-for-block from the embedded # installer data partition on the boot medium. # The source is a raw filesystem image; repart copies it verbatim. +# SizeMaxBytes bounds root-a's elastic growth to a realistic OS-payload size. +# It must never be set to the full test/VM disk size: with GrowFileSystem=yes +# and an unbounded cap, root-a's growth can consume the leftover space that +# /var (the tail partition, see 30-var.conf) needs, so the second boot drops +# to emergency mode waiting on /dev/disk/by-partlabel/var (issue #161). [Partition] Type=root Label=bluefin-server-root-a CopyBlocks=/dev/disk/by-partlabel/bluefin-installer-data SizeMinBytes=4G -SizeMaxBytes=16G +SizeMaxBytes=8G GrowFileSystem=yes diff --git a/files/installer/repart.d/30-var.conf b/files/installer/repart.d/30-var.conf index 7f2ec345..b3d10bcf 100644 --- a/files/installer/repart.d/30-var.conf +++ b/files/installer/repart.d/30-var.conf @@ -4,6 +4,9 @@ # creating /var entirely. # GrowFileSystem=yes: XFS grows to fill all remaining disk space after # the ESP and root-a partitions are placed. +# Weight= guarantees /var always gets a dominant share of the leftover disk +# space, so it retains its SizeMinBytes=4G even while root-a's elastic +# growth competes for the same free space (issue #161). [Partition] Type=var Label=var @@ -11,3 +14,4 @@ Format=xfs GrowFileSystem=yes CopyFiles=/k0s.raw:/lib/k0s/k0s.raw SizeMinBytes=4G +Weight=10000