]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Add a repart partition definition for the root partition into the default image 2878/head
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 17 Jul 2024 10:42:04 +0000 (12:42 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 17 Jul 2024 12:22:40 +0000 (14:22 +0200)
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 [new file with mode: 0644]
tests/test_initrd.py

diff --git a/mkosi.extra/usr/lib/repart.d/root.conf b/mkosi.extra/usr/lib/repart.d/root.conf
new file mode 100644 (file)
index 0000000..7612b24
--- /dev/null
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Partition]
+Type=root
index c1751b472a7f1667edf909e1457bf78a8d6199d6..461a3a8210196af462681d5614ca8a7b48aaf924 100644 (file)
@@ -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",