From 351427beb71a1225597b2246d8784371a3e55895 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 17 Jul 2024 12:42:04 +0200 Subject: [PATCH] Add a repart partition definition for the root partition into the default image This makes sure the partition is grown on boot to fill the disk, which is required for RuntimeSize= to work properly. --- mkosi.extra/usr/lib/repart.d/root.conf | 4 ++++ tests/test_initrd.py | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 mkosi.extra/usr/lib/repart.d/root.conf diff --git a/mkosi.extra/usr/lib/repart.d/root.conf b/mkosi.extra/usr/lib/repart.d/root.conf new file mode 100644 index 000000000..7612b246c --- /dev/null +++ b/mkosi.extra/usr/lib/repart.d/root.conf @@ -0,0 +1,4 @@ +# SPDX-License-Identifier: LGPL-2.1-or-later + +[Partition] +Type=root diff --git a/tests/test_initrd.py b/tests/test_initrd.py index c1751b472..461a3a821 100644 --- a/tests/test_initrd.py +++ b/tests/test_initrd.py @@ -97,6 +97,8 @@ def test_initrd_lvm(initrd: Image) -> None: options=[ "--initrd", Path(initrd.output_dir) / "initrd", "--kernel-command-line=systemd.unit=mkosi-check-and-shutdown.service", + # LVM confuses systemd-repart so we mask it for this test. + "--kernel-command-line=systemd.mask=systemd-repart.service", "--kernel-command-line=root=LABEL=root", "--kernel-command-line=rw", "--incremental", -- 2.47.2