diff --git a/man/rules/meson.build b/man/rules/meson.build
index 2bf5936d641..ff4794b5288 100644
--- a/man/rules/meson.build
+++ b/man/rules/meson.build
@@ -902,7 +902,7 @@ manpages = [
['systemd-debug-generator', '8', [], ''],
['systemd-delta', '1', [], ''],
['systemd-detect-virt', '1', [], ''],
- ['systemd-dissect', '1', [], 'HAVE_BLKID'],
+ ['systemd-dissect', '1', ['mount.ddi'], 'HAVE_BLKID'],
['systemd-environment-d-generator',
'8',
['30-systemd-environment-d-generator'],
diff --git a/man/systemd-dissect.xml b/man/systemd-dissect.xml
index 6549aa92c85..01eda2702dd 100644
--- a/man/systemd-dissect.xml
+++ b/man/systemd-dissect.xml
@@ -18,6 +18,7 @@
systemd-dissect
+ mount.ddiDissect Discoverable Disk Images (DDIs)
@@ -99,6 +100,14 @@
what it operates with when mounting the image. To display the complete list of partitions use a tool such
as fdisk8.
+
+ The systemd-dissect command may be invoked as mount.ddi in
+ which case it implements the mount8 "external
+ helper" interface. This ensures disk images compatible with systemd-dissect can be
+ mounted directly by mount and fstab5. For
+ details see below.
@@ -132,7 +141,13 @@
All mounted file systems are checked with the appropriate fsck8
implementation in automatic fixing mode, unless explicitly turned off () or
- read-only operation is requested ().
+ read-only operation is requested ().
+
+ Note that this functionality is also available in mount8 via a
+ command such as mount -t ddi myimage.raw targetdir/, as well as in fstab5. For
+ details, see below.
@@ -359,6 +374,35 @@
command is used the exit status of the invoked command is propagated.
+
+ Invocation as /sbin/mount.ddi
+
+ The systemd-dissect executable may be symlinked to
+ /sbin/mount.ddi. If invoked through that it implements mount8's
+ "external helper" interface for the (pseudo) file system type ddi. This means
+ conformant disk images may be mounted directly via
+
+ # mount -t ddi myimage.raw targetdir/
+
+ in a fashion mostly equivalent to:
+
+ # systemd-dissect --mount myimage.raw targetdir/
+
+ Note that since a single DDI may contain multiple file systems it should later be unmounted with
+ umount -R targetdir/, for recursive operation.
+
+ This functionality is particularly useful to mount DDIs automatically at boot via simple
+ /etc/fstab entries. For example:
+
+ /path/to/myimage.raw /images/myimage/ ddi defaults 0 0
+
+ When invoked this way the mount options ro, rw,
+ discard, nodiscard map to the corresponding options listed above
+ (i.e. , ,
+ ). Mount options are not generically passed on to
+ the file systems inside the images.
+ Examples
@@ -366,7 +410,7 @@
Generate a tarball from an OS disk image
- $ systemd-dissect --with foo.raw tar cz . >foo.tar.gz
+ # systemd-dissect --with foo.raw tar cz . >foo.tar.gz
@@ -377,6 +421,7 @@
systemd-nspawn1,
systemd.exec5,
Discoverable Partitions Specification,
+ mount8,
umount8,
fdisk8