From: Daan De Meyer Date: Sun, 29 Mar 2026 21:11:52 +0000 (+0000) Subject: repart: allow --el-torito= with any --empty= value X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be2ac4beb5298978ca5f6b63f2e48a5f1d660079;p=thirdparty%2Fsystemd.git repart: allow --el-torito= with any --empty= value The restriction requiring --empty= to be require, force, or create when using --el-torito= is unnecessary. context_verify_eltorito_overlap() already validates that the ISO 9660 blocks don't collide with GPT partition entries or the first usable LBA, which is sufficient to guarantee safety regardless of the empty mode. This is needed for two-stage image builds where the first stage creates the usr and verity partitions, and the second stage adds --el-torito= to produce a bootable ISO with a UKI containing usrhash= derived from the verity hash of the first stage. In the second stage, repart runs with --empty=allow since the image already exists. Co-developed-by: Claude Opus 4.6 --- diff --git a/man/systemd-repart.xml b/man/systemd-repart.xml index 0cb14b69913..271366e5efd 100644 --- a/man/systemd-repart.xml +++ b/man/systemd-repart.xml @@ -731,10 +731,6 @@ The disk requires at least one partition with Type=esp. The first one will be the one referenced in the boot catalog. - This option is available only when creating a new partition table, that is when - has value require, force or - create. - diff --git a/src/repart/repart.c b/src/repart/repart.c index 5c36bad0758..d672db6d266 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -10280,10 +10280,6 @@ static int parse_argv(int argc, char *argv[]) { arg_pager_flags |= PAGER_DISABLE; } - if (arg_eltorito && !IN_SET(arg_empty, EMPTY_REQUIRE, EMPTY_FORCE, EMPTY_CREATE)) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "--el-torito=yes requires --empty= to be either require, force or create."); - return 1; }