From d8fa8d7215b4d5d03e1a7d5cca21a5bbe60f3110 Mon Sep 17 00:00:00 2001 From: mrbobbytables Date: Wed, 16 Sep 2026 04:03:50 +0000 Subject: [PATCH] fix(installer): cap root-a SizeMaxBytes to 8G to guarantee /var space files/installer/repart.d/20-root-a.conf set SizeMaxBytes=16G with GrowFileSystem=yes, causing systemd-repart to expand root-a on 16G target disks and starve the /var partition (which requires SizeMinBytes=4G). This prevented /dev/disk/by-partlabel/var from appearing during boot in QEMU tests. Cap root-a SizeMaxBytes at 8G so that on a 16G target disk, after ESP (1G) and root-a (8G), at least 7G remains for /var, guaranteeing /var's 4G minimum footprint. Update test_repart_layout.py and ddi-installer documentation accordingly. Fixes #161 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: mrbobbytables --- docs/skills/ddi-installer.md | 2 +- files/installer/repart.d/20-root-a.conf | 2 +- tests/unit/test_repart_layout.py | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/skills/ddi-installer.md b/docs/skills/ddi-installer.md index f6fdfcf1..a511f943 100644 --- a/docs/skills/ddi-installer.md +++ b/docs/skills/ddi-installer.md @@ -94,7 +94,7 @@ container runtime pod sandboxes. | Partition | Type | Size | Contents | |---|---|---|---| | ESP | vfat | 500 MiB – 1 GiB | `systemd-boot` + target OS UKI (`bluefin-server.efi`) | -| `bluefin-server-root-a` | XFS | 4 GiB – 16 GiB | OS root filesystem (copied from installer data partition) | +| `bluefin-server-root-a` | XFS | 4 GiB – 8 GiB | OS root filesystem (copied from installer data partition) | | `var` | XFS | ≥ 4 GiB | Writable persistent `/var`; grows to fill remaining disk | ## Installer Boot Flow diff --git a/files/installer/repart.d/20-root-a.conf b/files/installer/repart.d/20-root-a.conf index b10319bd..e843b30a 100644 --- a/files/installer/repart.d/20-root-a.conf +++ b/files/installer/repart.d/20-root-a.conf @@ -7,5 +7,5 @@ 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/tests/unit/test_repart_layout.py b/tests/unit/test_repart_layout.py index bf5a0bd0..f0127fc8 100644 --- a/tests/unit/test_repart_layout.py +++ b/tests/unit/test_repart_layout.py @@ -180,6 +180,10 @@ def test_root_slot_grows_and_is_bounded_below_the_var_partition(): assert "SizeMaxBytes" in root, ( "the root slot must be capped, otherwise /var gets no space on small disks" ) + assert parse_size(root["SizeMaxBytes"]) <= 8 * 1024**3, ( + "the root slot must be capped at 8G or less so /var is guaranteed at least " + "its SizeMinBytes (4G) on standard 16G target disks" + ) def test_var_is_a_growing_xfs_tail():