]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/systemd-dissect.xml
man: use <simplelist> for 'See also' sections
[thirdparty/systemd.git] / man / systemd-dissect.xml
index 06c57a22ecdbd52ee6be31460be94682daa9bfeb..23374fd73bd713c9799ad85f79e0e42044759260 100644 (file)
     <cmdsynopsis>
       <command>systemd-dissect <arg choice="opt" rep="repeat">OPTIONS</arg> <option>--copy-to</option> <arg choice="plain"><replaceable>IMAGE</replaceable></arg> <arg choice="opt"><replaceable>SOURCE</replaceable></arg> <arg choice="plain"><replaceable>PATH</replaceable></arg></command>
     </cmdsynopsis>
+    <cmdsynopsis>
+      <command>systemd-dissect <arg choice="opt" rep="repeat">OPTIONS</arg> <option>--discover</option></command>
+    </cmdsynopsis>
+    <cmdsynopsis>
+      <command>systemd-dissect <arg choice="opt" rep="repeat">OPTIONS</arg> <option>--validate</option> <arg choice="plain"><replaceable>IMAGE</replaceable></arg></command>
+    </cmdsynopsis>
   </refsynopsisdiv>
 
   <refsect1>
         project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry> via a
         command such as <command>mount -t ddi myimage.raw targetdir/</command>, as well as in <citerefentry
         project='man-pages'><refentrytitle>fstab</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
-        details, see below.</para></listitem>
+        details, see below.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>-M</option></term>
 
-        <listitem><para>This is a shortcut for <option>--mount --mkdir</option>.</para></listitem>
+        <listitem><para>This is a shortcut for <option>--mount --mkdir</option>.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         a directory where an OS image was mounted.</para>
 
         <para>All mounted partitions will be recursively unmounted, and the underlying loop device will be
-        removed, along with all its partition sub-devices.</para></listitem>
+        removed, along with all its partition sub-devices.</para>
+
+        <xi:include href="version-info.xml" xpointer="v252"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>-U</option></term>
 
-        <listitem><para>This is a shortcut for <option>--umount --rmdir</option>.</para></listitem>
+        <listitem><para>This is a shortcut for <option>--umount --rmdir</option>.</para>
+
+        <xi:include href="version-info.xml" xpointer="v252"/></listitem>
       </varlistentry>
 
       <varlistentry>
         and print the path to the loopback block device to standard output. This is similar to an invocation
         of <command>losetup --find --show</command>, but will validate the image as DDI before attaching, and
         derive the correct sector size to use automatically. Moreover, it ensures the per-partition block
-        devices are created before returning. Takes a path to a disk image file.</para></listitem>
+        devices are created before returning. Takes a path to a disk image file.</para>
+
+        <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <listitem><para>Detach the specified disk image from a loopback block device. This undoes the effect
         of <option>--attach</option> above. This expects either a path to a loopback block device as an
         argument, or the path to the backing image file. In the latter case it will automatically determine
-        the right device to detach.</para></listitem>
+        the right device to detach.</para>
+
+        <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>--list</option></term>
         <term><option>-l</option></term>
 
-        <listitem><para>Prints the paths of all the files and directories in the specified OS image to
-        standard output.</para></listitem>
+        <listitem><para>Prints the paths of all the files and directories in the specified OS image or
+        directory to standard output.</para>
+
+        <xi:include href="version-info.xml" xpointer="v253"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>--mtree</option></term>
-        <term><option>-l</option></term>
 
-        <listitem><para>Generates a BSD <citerefentry
-        project='die-net'><refentrytitle>mtree</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-        compatible file manifest of the specified disk image. This is useful for comparing disk image
+        <listitem><para>Generates a BSD
+        <citerefentry project='die-net'><refentrytitle>mtree</refentrytitle><manvolnum>8</manvolnum></citerefentry>
+        compatible file manifest of the specified disk image or directory. This is useful for comparing image
         contents in detail, including inode information and other metadata. While the generated manifest will
         contain detailed inode information, it currently excludes extended attributes, file system
-        capabilities, MAC labels, <citerefentry
-        project='man-pages'><refentrytitle>chattr</refentrytitle><manvolnum>1</manvolnum></citerefentry> file
-        flags, btrfs subvolume information, and various other file metadata. File content information is
-        shown via a SHA256 digest. Additional fields might be added in future. Note that inode information
-        such as link counts, inode numbers and timestamps is excluded from the output on purpose, as it
-        typically complicates reproducibility.</para></listitem>
+        capabilities, MAC labels,
+        <citerefentry project='man-pages'><refentrytitle>chattr</refentrytitle><manvolnum>1</manvolnum></citerefentry>
+        file flags,
+        <citerefentry project='url'><refentrytitle url='https://btrfs.readthedocs.io/en/latest/btrfs-man5.html'>btrfs</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+        subvolume information, and various other file metadata. File content information is shown via a
+        SHA256 digest. Additional fields might be added in future. Note that inode information such as link
+        counts, inode numbers and timestamps is excluded from the output on purpose, as it typically
+        complicates reproducibility.</para>
+
+        <xi:include href="version-info.xml" xpointer="v253"/></listitem>
       </varlistentry>
 
       <varlistentry>
         use <option>--read-only</option> to switch to read-only operation. The invoked process will have the
         <varname>$SYSTEMD_DISSECT_ROOT</varname> environment variable set, containing the absolute path name
         of the temporary mount point, i.e. the same directory that is set as the current working
-        directory.</para></listitem>
+        directory. It will also have the <varname>$SYSTEMD_DISSECT_DEVICE</varname> environment variable set,
+        containing the absolute path name of the loop device the image was attached to.</para>
+
+        <xi:include href="version-info.xml" xpointer="v253"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>--copy-from</option></term>
         <term><option>-x</option></term>
 
-        <listitem><para>Copies a file or directory from the specified OS image into the specified location on
-        the host file system. Expects three arguments: a path to an image file, a source path (relative to
-        the image's root directory) and a destination path (relative to the current working directory, or an
-        absolute path, both outside of the image). If the destination path is omitted or specified as dash
-        (<literal>-</literal>), the specified file is written to standard output. If the source path in the
-        image file system refers to a regular file it is copied to the destination path. In this case access
-        mode, extended attributes and timestamps are copied as well, but file ownership is not. If the source
-        path in the image refers to a directory, it is copied to the destination path, recursively with all
-        containing files and directories. In this case the file ownership is copied too.</para></listitem>
+        <listitem><para>Copies a file or directory from the specified OS image or directory into the
+        specified location on the host file system. Expects three arguments: a path to an image file or
+        directory, a source path (relative to the image's root directory) and a destination path (relative to
+        the current working directory, or an absolute path, both outside of the image). If the destination
+        path is omitted or specified as dash (<literal>-</literal>), the specified file is written to
+        standard output. If the source path in the image file system refers to a regular file it is copied to
+        the destination path. In this case access mode, extended attributes and timestamps are copied as
+        well, but file ownership is not. If the source path in the image refers to a directory, it is copied
+        to the destination path, recursively with all containing files and directories. In this case the file
+        ownership is copied too.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>-a</option></term>
 
         <listitem><para>Copies a file or directory from the specified location in the host file system into
-        the specified OS image. Expects three arguments: a path to an image file, a source path (relative to
-        the current working directory, or an absolute path, both outside of the image) and a destination path
-        (relative to the image's root directory). If the source path is omitted or specified as dash
-        (<literal>-</literal>), the data to write is read from standard input. If the source path in the host
-        file system refers to a regular file, it is copied to the destination path. In this case access mode,
-        extended attributes and timestamps are copied as well, but file ownership is not. If the source path
-        in the host file system refers to a directory it is copied to the destination path, recursively with
-        all containing files and directories. In this case the file ownership is copied
-        too.</para>
+        the specified OS image or directory. Expects three arguments: a path to an image file or directory, a
+        source path (relative to the current working directory, or an absolute path, both outside of the
+        image) and a destination path (relative to the image's root directory). If the source path is omitted
+        or specified as dash (<literal>-</literal>), the data to write is read from standard input. If the
+        source path in the host file system refers to a regular file, it is copied to the destination path.
+        In this case access mode, extended attributes and timestamps are copied as well, but file ownership
+        is not. If the source path in the host file system refers to a directory it is copied to the
+        destination path, recursively with all containing files and directories. In this case the file
+        ownership is copied too.</para>
 
         <para>As with <option>--mount</option> file system checks are implicitly run before the copy
-        operation begins.</para></listitem>
+        operation begins.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>--discover</option></term>
 
         <listitem><para>Show a list of DDIs in well-known directories. This will show machine, portable
-        service and system extension disk images in the usual directories
+        service and system/configuration extension disk images in the usual directories
         <filename>/usr/lib/machines/</filename>, <filename>/usr/lib/portables/</filename>,
-        <filename>/usr/lib/extensions/</filename>, <filename>/var/lib/machines/</filename>,
+        <filename>/usr/lib/confexts/</filename>, <filename>/var/lib/machines/</filename>,
         <filename>/var/lib/portables/</filename>, <filename>/var/lib/extensions/</filename> and so
-        on.</para></listitem>
+        on.</para>
+
+        <xi:include href="version-info.xml" xpointer="v253"/></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--validate</option></term>
+
+        <listitem><para>Validates the partition arrangement of a disk image (DDI), and ensures it matches the
+        image policy specified via <option>--image-policy=</option>, if one is specified. This parses the
+        partition table and probes the file systems in the image, but does not attempt to mount them (nor to
+        set up disk encryption/authentication via LUKS/Verity). It does this taking the configured image
+        dissection policy into account. Since this operation does not mount file systems, this command –
+        unlike all other commands implemented by this tool – requires no privileges other than the ability to
+        access the specified file. Prints "OK" and returns zero if the image appears to be in order and
+        matches the specified image dissection policy. Otherwise prints an error message and returns
+        non-zero.</para>
+
+        <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
 
       <xi:include href="standard-options.xml" xpointer="help" />
 
         <listitem><para>Operate in read-only mode. By default <option>--mount</option> will establish
         writable mount points. If this option is specified they are established in read-only mode
-        instead.</para></listitem>
+        instead.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         OS image are automatically checked using the appropriate <citerefentry
         project='man-pages'><refentrytitle>fsck</refentrytitle><manvolnum>8</manvolnum></citerefentry>
         command, in automatic fixing mode. This behavior may be switched off using
-        <option>--fsck=no</option>.</para></listitem>
+        <option>--fsck=no</option>.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
           <listitem><para>Bit 59 of the GPT partition flags for this partition is set, as per specification</para></listitem>
           <listitem><para>The <option>--growfs=no</option> option is not passed.</para></listitem>
         </orderedlist>
+
+          <xi:include href="version-info.xml" xpointer="v249"/>
         </listitem>
       </varlistentry>
 
 
         <listitem><para>If combined with <option>--mount</option> the directory to mount the OS image to is
         created if it is missing. Note that the directory is not automatically removed when the disk image is
-        unmounted again.</para></listitem>
+        unmounted again.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <term><option>--rmdir</option></term>
 
         <listitem><para>If combined with <option>--umount</option> the specified directory where the OS image
-        is mounted is removed after unmounting the OS image.</para></listitem>
+        is mounted is removed after unmounting the OS image.</para>
+
+        <xi:include href="version-info.xml" xpointer="v252"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <literal>all</literal>, <literal>crypto</literal>. If <literal>disabled</literal> the image is
         accessed with empty block discarding turned off. If <literal>loop</literal> discarding is enabled if
         operating on a regular file. If <literal>crypt</literal> discarding is enabled even on encrypted file
-        systems. If <literal>all</literal> discarding is unconditionally enabled.</para></listitem>
+        systems. If <literal>all</literal> discarding is unconditionally enabled.</para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         <listitem><para>If specified an in-memory copy of the specified disk image is used. This may be used
         to operate with write-access on a (possibly read-only) image, without actually modifying the original
         file. This may also be used in order to operate on a disk image without keeping the originating file
-        system busy, in order to allow it to be unmounted.</para></listitem>
+        system busy, in order to allow it to be unmounted.</para>
+
+        <xi:include href="version-info.xml" xpointer="v253"/></listitem>
       </varlistentry>
 
       <varlistentry>
         image, in case it is stored in a detached file. It is recommended to embed the Verity data directly
         in the image, using the Verity mechanisms in the <ulink
         url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable Partitions Specification</ulink>.
-        </para></listitem>
+        </para>
+
+        <xi:include href="version-info.xml" xpointer="v247"/></listitem>
       </varlistentry>
 
       <varlistentry>
         former is not.</para>
 
         <para>This setting is particularly useful in combination with the <option>--attach</option> command,
-        as it allows later referencing the allocated loop device via <filename>/dev/loop/by-ref/…</filename>
-        symlinks. Example: first, set up the loopback device via <command>systemd-dissect attach
-        --loop-ref=quux foo.raw</command>, and then reference it in a command via the specified filename:
-        <command>cfdisk /dev/loop/by-ref/quux</command>.</para></listitem>
+        as it allows later referencing the allocated loop device via
+        <filename>/dev/disk/by-loop-ref/…</filename> symlinks. Example: first, set up the loopback device
+        via <command>systemd-dissect attach --loop-ref=quux foo.raw</command>, and then reference it in a
+        command via the specified filename: <command>cfdisk /dev/disk/by-loop-ref/quux</command>.
+        </para>
+
+        <xi:include href="version-info.xml" xpointer="v254"/></listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>--mtree-hash=no</option></term>
+
+        <listitem><para>If combined with <option>--mtree</option>, turns off inclusion of file hashes in the
+        mtree output. This makes the <option>--mtree</option> faster when operating on large images.
+        </para>
+
+        <xi:include href="version-info.xml" xpointer="v254"/></listitem>
       </varlistentry>
 
+      <xi:include href="standard-options.xml" xpointer="image-policy-open" />
       <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" />
 
   <refsect1>
     <title>See Also</title>
-    <para>
-      <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
-      <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
-      <ulink url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable Partitions Specification</ulink>,
-      <citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>umount</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
-      <citerefentry project='man-pages'><refentrytitle>fdisk</refentrytitle><manvolnum>8</manvolnum></citerefentry>
-    </para>
+    <para><simplelist type="inline">
+      <member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+      <member><citerefentry><refentrytitle>systemd-nspawn</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+      <member><citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry></member>
+      <member><ulink url="https://uapi-group.org/specifications/specs/discoverable_partitions_specification">Discoverable Partitions Specification</ulink></member>
+      <member><citerefentry project='man-pages'><refentrytitle>mount</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
+      <member><citerefentry project='man-pages'><refentrytitle>umount</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
+      <member><citerefentry project='man-pages'><refentrytitle>fdisk</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
+    </simplelist></para>
   </refsect1>
 
 </refentry>