From 3c367df7c6efeecce7116a71283d2ec9f7c92722 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Tue, 28 May 2024 23:15:25 +0200 Subject: [PATCH] mkosi: Switch from btrfs to ext4 Mounting multiple btrfs filesystems with the same fsid only works properly from kernel 6.7 onwards. Let's switch to ext4 for now which does support this. --- mkosi.conf | 3 +++ mkosi.conf.d/10-centos.conf | 3 --- mkosi.images/system/mkosi.conf.d/10-centos/mkosi.conf | 3 --- .../10-centos/mkosi.repart/10-root.conf.d/xfs.conf | 6 ------ mkosi.images/system/mkosi.repart/10-root.conf | 2 +- 5 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 mkosi.images/system/mkosi.conf.d/10-centos/mkosi.repart/10-root.conf.d/xfs.conf diff --git a/mkosi.conf b/mkosi.conf index 9d23f4f8b2c..2da8804a7ef 100644 --- a/mkosi.conf +++ b/mkosi.conf @@ -14,6 +14,9 @@ MinimumVersion=23~devel Environment=ASAN_OPTIONS=verify_asan_link_order=false MKOSI_ASAN_OPTIONS=strict_string_checks=1:detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1:disable_coredump=0:use_madv_dontdump=1 MKOSI_UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1 + # The kernel versions in CentOS Stream 9 and Ubuntu 22.04 don't support orphan_file, but later + # versions of mkfs.ext4 enabled it by default, so we disable it explicitly. + SYSTEMD_REPART_MKFS_OPTIONS_EXT4="-O ^orphan_file" @SELinuxRelabel=no BuildSourcesEphemeral=yes diff --git a/mkosi.conf.d/10-centos.conf b/mkosi.conf.d/10-centos.conf index 69fa1350e60..ae2706c7917 100644 --- a/mkosi.conf.d/10-centos.conf +++ b/mkosi.conf.d/10-centos.conf @@ -8,6 +8,3 @@ Distribution=centos Repositories=epel epel-next hyperscale-packages-main - -[Content] -Environment=SYSTEMD_REPART_MKFS_OPTIONS_EXT4="-O ^orphan_file" diff --git a/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.conf b/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.conf index 60ea1cb6a3b..843b96d9a61 100644 --- a/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.conf +++ b/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.conf @@ -3,9 +3,6 @@ [Match] Distribution=centos -[Output] -RepartDirectories=mkosi.repart - [Content] Packages= rpmautospec-rpm-macros diff --git a/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.repart/10-root.conf.d/xfs.conf b/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.repart/10-root.conf.d/xfs.conf deleted file mode 100644 index a50de68110e..00000000000 --- a/mkosi.images/system/mkosi.conf.d/10-centos/mkosi.repart/10-root.conf.d/xfs.conf +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1-or-later - -[Partition] -# btrfs isn't supported on CentOS. Ideally we'd use xfs instead but we lose xattrs when doing rootless -# population of xfs which is required for testing SELinux so let's do ext4 instead. -Format=ext4 diff --git a/mkosi.images/system/mkosi.repart/10-root.conf b/mkosi.images/system/mkosi.repart/10-root.conf index 3c25dbfb14d..715b9254630 100644 --- a/mkosi.images/system/mkosi.repart/10-root.conf +++ b/mkosi.images/system/mkosi.repart/10-root.conf @@ -2,7 +2,7 @@ [Partition] Type=root -Format=btrfs +Format=ext4 CopyFiles=/ SizeMinBytes=8G SizeMaxBytes=8G -- 2.47.3