[PATCH 2/2] Documentation/admin-guide/binfmt-misc/mono: add Caveats

From: Mingye Wang
Date: Mon Nov 03 2025 - 05:29:41 EST


This will clash with wine. Spell it out.
---
Documentation/admin-guide/binfmt-misc/mono.rst | 13 +++++++++++++
1 file changed, 13 insertions(+)

diff --git a/Documentation/admin-guide/binfmt-misc/mono.rst b/Documentation/admin-guide/binfmt-misc/mono.rst
index c6dab568006..a11655c72b5 100644
--- a/Documentation/admin-guide/binfmt-misc/mono.rst
+++ b/Documentation/admin-guide/binfmt-misc/mono.rst
@@ -68,3 +68,16 @@ other program after you have done the following:

If this fails with a permission denied error, check
that the ``.exe`` file has execute permissions.
+
+Caveats
+^^^^^^^
+
+You may have noticed that our registration line is virtually the same
+as the one for wine, with ``MZ`` as the magic number and no offset.
+This means that if you have both wine and mono installed, only one
+of them will work, depending on which one was registered last.
+
+To solve this problem, you can use a wrapper script for either wine
+or mono that checks the file type and invokes the correct interpreter.
+For example, ``file`` is able to distinguish between .NET CLR binaries
+and regular Windows binaries.
--
2.49.0.windows.1