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 <noreply@anthropic.com>
<para>The disk requires at least one partition with <varname>Type=esp</varname>. The first one will
be the one referenced in the boot catalog.</para>
- <para>This option is available only when creating a new partition table, that is when
- <option>--empty=</option> has value <literal>require</literal>, <literal>force</literal> or
- <literal>create</literal>.</para>
-
<xi:include href="version-info.xml" xpointer="v261"/></listitem>
</varlistentry>
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;
}