{
    "mode": "man",
    "parameter": "systemd.image-policy",
    "section": "7",
    "url": "https://www.chedong.com/phpMan.php/man/systemd.image-policy/7/json",
    "generated": "2026-11-18T18:37:08Z",
    "sections": {
        "NAME": {
            "content": "systemd.image-policy - Disk Image Dissection Policy\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "In systemd, whenever a disk image (DDI) implementing the Discoverable Partitions\nSpecification[1] is activated, a policy may be specified controlling which partitions to\nmount and what kind of cryptographic protection to require. Such a disk image dissection\npolicy is a string that contains per-partition-type rules, separated by colons (\":\"). The\nindividual rules consist of a partition identifier, an equal sign (\"=\"), and one or more\nflags which may be set per partition. If multiple flags are specified per partition they are\nseparated by a plus sign (\"+\").\n\nThe partition identifiers currently defined are: root, usr, home, srv, esp, xbootldr, swap,\nroot-verity, root-verity-sig, usr-verity, usr-verity-sig, tmp, var. These identifiers match\nthe relevant partition types in the Discoverable Partitions Specification, but are agnostic\nto CPU architectures. If the partition identifier is left empty it defines the default policy\nfor partitions defined in the Discoverable Partitions Specification for which no policy flags\nare explicitly listed in the policy string.\n\nThe following partition policy flags are defined that dictate the existence/absence, the use,\nand the protection level of partitions:\n\n•   unprotected for partitions that shall exist and be used, but shall come without\ncryptographic protection, lacking both Verity authentication and LUKS encryption.\n\n•   verity for partitions that shall exist and be used, with Verity authentication. (Note: if\na DDI image carries a data partition, along with a Verity partition and a signature\npartition for it, and only the verity flag is set (signed is not), then the image will be\nset up with Verity, but the signature data will not be used. Or in other words: any DDI\nwith a set of partitions that qualify for signature also implicitly qualifies for verity,\nand in fact also unprotected).\n\n•   signed for partitions that shall exist and be used, with Verity authentication, which are\nalso accompanied by a PKCS#7 signature of the Verity root hash.\n\n•   encrypted for partitions which shall exist and be used and are encrypted with LUKS.\n\n•   unused for partitions that shall exist but shall not be used.\n\n•   absent for partitions that shall not exist on the image.\n\nBy setting a combination of the flags above, alternatives can be declared. For example the\ncombination \"unused+absent\" means: the partition may exist (in which case it shall not be\nused) or may be absent. The combination of\n\"unprotected+verity+signed+encrypted+unused+absent\" may be specified via the special shortcut\n\"open\", and indicates that the partition may exist or may be absent, but if it exists is\nused, regardless of the protection level.\n\nAs special rule: if none of the flags above are set for a listed partition identifier, the\ndefault policy of open is implied, i.e. setting none of these flags listed above means\neffectively all flags listed above will be set.\n\nThe following partition policy flags are defined that dictate the state of specific GPT\npartition flags:\n\n•   read-only-off, read-only-on to require that the partitions have the read-only partition\nflag off or on.\n\n•   growfs-off, growfs-on to require that the partitions have the growfs partition flag off\nor on.\n\nIf both read-only-off and read-only-on are set for a partition, then the state of the\nread-only flag on the partition is not dictated by the policy. Setting neither flag is\nequivalent to setting both, i.e. setting neither of these two flags means effectively both\nwill be set. A similar logic applies to growfs-off/growfs-on.\n\nIf partitions are not listed within an image policy string, the default policy flags are\napplied (configurable via an empty partition identifier, see above). If no default policy\nflags are configured in the policy string, it is implied to be \"absent+unused\", except for\nthe Verity partition and their signature partitions where the policy is automatically derived\nfrom minimal protection level of the data partition they protect, as encoded in the policy.\n",
            "subsections": []
        },
        "SPECIAL POLICIES": {
            "content": "The special image policy string \"*\" is short for \"use everything\", i.e. is equivalent to:\n\n=verity+signed+encrypted+unprotected+unused+absent\n\nThe special image policy string \"-\" is short for \"use nothing\", i.e. is equivalent to:\n\n=unused+absent\n\nThe special image policy string \"~\" is short for \"everything must be absent\", i.e. is\nequivalent to:\n\n=absent\n",
            "subsections": []
        },
        "USE": {
            "content": "Most systemd components that support operating with disk images support a --image-policy=\ncommand line option to specify the image policy to use, and default to relatively open\npolicies (typically the \"*\" policy, as described above), under the assumption that trust in\ndisk images is established before the images are passed to the program in question.\n\nFor the host image itself systemd-gpt-auto-generator(8) is responsible for processing the GPT\npartition table and making use of the included discoverable partitions. It accepts an image\npolicy via the kernel command line option systemd.image-policy=.\n\nNote that image policies do not dictate how the components will mount and use disk images —\nthey only dictate which parts to avoid and which protection level and arrangement to require\nwhile mounting/using them. For example, systemd-sysext(8) only cares for the /usr/ and /opt/\ntrees inside a disk image, and thus ignores any /home/ partitions (and similar) in all cases,\nwhich might be included in the image, regardless whether the configured image policy would\nallow access to it or not. Similar, systemd-nspawn(1) is not going to make use of any\ndiscovered swap device, regardless if the policy would allow that or not.\n\nUse the image-policy command of the systemd-analyze(8) tool to analyze image policy strings,\nand determine what a specific policy string means for a specific partition.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "The following image policy string dictates one read-only Verity-enabled /usr/ partition must\nexist, plus encrypted root and swap partitions. All other partitions are ignored:\n\nusr=verity+read-only-on:root=encrypted:swap=encrypted\n\nThe following image policy string dictates an encrypted, writable root file system, and\noptional /srv/ file system that must be encrypted if it exists and no swap partition may\nexist:\n\nroot=encrypted+read-only-off:srv=encrypted+absent:swap=absent\n\nThe following image policy string dictates a single root partition that may be encrypted, but\ndoesn't have to be, and ignores swap partitions, and uses all other partitions if they are\navailable, possibly with encryption.\n\nroot=unprotected+encrypted:swap=absent+unused:=unprotected+encrypted+absent\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "systemd(1), systemd-dissect(1), systemd-gpt-auto-generator(8), systemd-sysext(8), systemd-\nanalyze(8)\n",
            "subsections": []
        },
        "NOTES": {
            "content": "1. Discoverable Partitions Specification\nhttps://uapi-group.org/specifications/specs/discoverablepartitionsspecification\n\nsystemd 255                                                                  SYSTEMD.IMAGE-POLICY(7)",
            "subsections": []
        }
    },
    "summary": "systemd.image-policy - Disk Image Dissection Policy",
    "flags": [],
    "examples": [
        "The following image policy string dictates one read-only Verity-enabled /usr/ partition must",
        "exist, plus encrypted root and swap partitions. All other partitions are ignored:",
        "usr=verity+read-only-on:root=encrypted:swap=encrypted",
        "The following image policy string dictates an encrypted, writable root file system, and",
        "optional /srv/ file system that must be encrypted if it exists and no swap partition may",
        "exist:",
        "root=encrypted+read-only-off:srv=encrypted+absent:swap=absent",
        "The following image policy string dictates a single root partition that may be encrypted, but",
        "doesn't have to be, and ignores swap partitions, and uses all other partitions if they are",
        "available, possibly with encryption.",
        "root=unprotected+encrypted:swap=absent+unused:=unprotected+encrypted+absent"
    ],
    "see_also": [
        {
            "name": "systemd",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
        },
        {
            "name": "systemd-dissect",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-dissect/1/json"
        },
        {
            "name": "systemd-gpt-auto-generator",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-gpt-auto-generator/8/json"
        },
        {
            "name": "systemd-sysext",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/systemd-sysext/8/json"
        },
        {
            "name": "analyze",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/analyze/8/json"
        }
    ]
}