]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: document image filters
authorLennart Poettering <lennart@poettering.net>
Thu, 20 Mar 2025 16:15:41 +0000 (17:15 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 3 Apr 2025 09:08:57 +0000 (11:08 +0200)
man/kernel-command-line.xml
man/rules/meson.build
man/standard-options.xml
man/systemd-dissect.xml
man/systemd-gpt-auto-generator.xml
man/systemd.image-filter.xml [new file with mode: 0644]
man/systemd.image-policy.xml

index 3a4619edeef0fea28fe7a4e1e6802a91295ecdd5..17740fb4e456a096f5a11c72df7220e0ff94f2a9 100644 (file)
         <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><varname>systemd.image_filter=</varname></term>
+
+        <listitem><para>When GPT-based partition auto-discovery is used, configures the image dissection
+        filter string to apply, as per
+        <citerefentry><refentrytitle>systemd.image-filter</refentrytitle><manvolnum>7</manvolnum></citerefentry>. For
+        details see
+        <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>.</para>
+
+        <xi:include href="version-info.xml" xpointer="v258"/></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><varname>systemd.default_timeout_start_sec=</varname></term>
 
index c33d9fee0e4218202059c0358aa7167a96eba218..0b930d3beb4528e80c71f9e9bf9113bf811c1f47 100644 (file)
@@ -1188,6 +1188,7 @@ manpages = [
  ['systemd.environment-generator', '7', [], 'ENABLE_ENVIRONMENT_D'],
  ['systemd.exec', '5', [], ''],
  ['systemd.generator', '7', [], ''],
+ ['systemd.image-filter', '7', [], ''],
  ['systemd.image-policy', '7', [], ''],
  ['systemd.journal-fields', '7', [], ''],
  ['systemd.kill', '5', [], ''],
index 1e958594ad9bb3de5f76c2728151bc33b672a37a..d07ea4a09a4b95b08eb73cea49ce3171ed424b74 100644 (file)
     in the image are used.</para></listitem>
   </varlistentry>
 
+  <varlistentry id='image-filter'>
+    <term><option>--image-filter=<replaceable>filter</replaceable></option></term> <listitem><para>Takes an
+    image filter string as argument, as per
+    <citerefentry><refentrytitle>systemd.image-filter</refentrytitle><manvolnum>7</manvolnum></citerefentry>. The
+    filter is taken into consideration when operating on the disk image specified via
+    <option>--image=</option>, see above. If not specified no filtering is applied.</para></listitem>
+  </varlistentry>
+
   <varlistentry id='esp-path'>
     <term><option>--esp-path=</option></term>
 
index 4b51fb887cdc3ff5037edb4fe43ae737ebe0ae1d..3094a1e6d9b5c00c9e89f093dbc3d3b811d44994 100644 (file)
       </varlistentry>
 
       <xi:include href="standard-options.xml" xpointer="image-policy-open" />
+      <xi:include href="standard-options.xml" xpointer="image-filter" />
       <xi:include href="standard-options.xml" xpointer="no-pager" />
       <xi:include href="standard-options.xml" xpointer="no-legend" />
       <xi:include href="standard-options.xml" xpointer="json" />
index af450f9fbe615c6fe4f5275c64a73e367ab56918..11b08f0b8deebc260804eb89916040350384b49a 100644 (file)
         <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
 
+      <varlistentry>
+        <term><varname>systemd.image_filter=</varname></term>
+
+        <listitem><para>Takes an image dissection filter string as argument (as per
+        <citerefentry><refentrytitle>systemd.image-filter</refentrytitle><manvolnum>7</manvolnum></citerefentry>),
+        and allows enforcing a set of globbing patterns on the partition matching of the automatically
+        discovered GPT partition table entries.</para>
+
+        <xi:include href="version-info.xml" xpointer="v258"/></listitem>
+      </varlistentry>
+
       <varlistentry>
         <term><varname>root=</varname></term>
         <term><varname>rootfstype=</varname></term>
diff --git a/man/systemd.image-filter.xml b/man/systemd.image-filter.xml
new file mode 100644 (file)
index 0000000..f5a8a81
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version='1.0'?> <!--*-nxml-*-->
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+  "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
+
+<refentry id="systemd.image-filter">
+
+  <refentryinfo>
+    <title>systemd.image-filter</title>
+    <productname>systemd</productname>
+  </refentryinfo>
+
+  <refmeta>
+    <refentrytitle>systemd.image-filter</refentrytitle>
+    <manvolnum>7</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>systemd.image-filter</refname>
+    <refpurpose>Disk Image Dissection Filter</refpurpose>
+  </refnamediv>
+
+  <refsect1>
+    <title>Description</title>
+
+    <para>In systemd, whenever a disk image (DDI) implementing the <ulink
+    url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable
+    Partitions Specification</ulink> is activated, a filter may be specified controlling which partitions to
+    consider for mounting. Such a disk image dissection filter is a string that contains per-partition-type
+    patterns, separated by colons (<literal>:</literal>). The individual rules consist of a partition
+    identifier, an equal sign (<literal>=</literal>), and a shell globbing pattern applied to the GPT label
+    string of the partition. See <citerefentry
+    project='man-pages'><refentrytitle>glob</refentrytitle><manvolnum>7</manvolnum></citerefentry> for
+    details on shell globbing.</para>
+
+    <para>The partition identifiers currently defined are: <option>root</option>, <option>usr</option>,
+    <option>home</option>, <option>srv</option>, <option>esp</option>, <option>xbootldr</option>,
+    <option>swap</option>, <option>root-verity</option>, <option>root-verity-sig</option>,
+    <option>usr-verity</option>, <option>usr-verity-sig</option>, <option>tmp</option>,
+    <option>var</option>. These identifiers match the relevant partition types in the Discoverable Partitions
+    Specification, but are agnostic to CPU architectures.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Use</title>
+
+    <para>Various systemd components that support operating with disk images support a
+    <option>--image-filter=</option> command line option to specify the image filter to use. If no filter is
+    specified all partitions in partition table are considered and no per-label filtering is applied (except
+    that partitions with the <literal>_empty</literal> label are always ignored).</para>
+
+    <para>For the host root file system image itself
+    <citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+    is responsible for processing the GPT partition table and making use of the included discoverable
+    partitions. It accepts an image filter via the kernel command line option
+    <option>systemd.image_filter=</option>.</para>
+  </refsect1>
+
+  <refsect1>
+    <title>Examples</title>
+
+    <para>The following image filter string dictates that for the root file system partition only partitions
+    shall be considered whose label begins with <literal>ParticleOS-</literal>. For the
+    <filename>/usr/</filename> partition the precise label <literal>ParticleOS_47110815</literal> is
+    required.</para>
+
+    <programlisting>root=ParticleOS-*:usr=ParticleOS_47110815</programlisting>
+  </refsect1>
+
+  <refsect1>
+    <title>See Also</title>
+    <para><simplelist type="inline">
+      <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+      <member><citerefentry><refentrytitle>systemd-dissect</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+      <member><citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
+      <member><citerefentry><refentrytitle>systemd.image-policy</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
+    </simplelist></para>
+  </refsect1>
+
+</refentry>
index 36a8395bf0ca56a62383dbfc6252e6ec1711a34c..d351ffeea5b19e2bf54c1174670a44efc59357ab 100644 (file)
       <member><citerefentry><refentrytitle>systemd-gpt-auto-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
       <member><citerefentry><refentrytitle>systemd-sysext</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
       <member><citerefentry><refentrytitle>systemd-analyze</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+      <member><citerefentry><refentrytitle>systemd.filter</refentrytitle><manvolnum>7</manvolnum></citerefentry></member>
     </simplelist></para>
   </refsect1>