{
    "content": [
        {
            "type": "text",
            "text": "# kpartx (man)\n\n## NAME\n\nkpartx - Create device maps from partition tables.\n\n## SYNOPSIS\n\nkpartx [-a|-d|-u|-l] [-r] [-p] [-f] [-g] [-s|-n] [-v] wholedisk\n\n## DESCRIPTION\n\nThis  tool,  derived  from  util-linux' partx, reads partition tables on specified device and\ncreate device maps over partitions segments detected. It is called from hotplug  upon  device\nmaps creation and deletion.\n\n## TLDR\n\n> Create device maps from partition tables.\n\n- Add partition mappings and print created mappings:\n  `kpartx -av {{whole_disk.img}}`\n- Delete partition mappings:\n  `kpartx -d {{whole_disk.img}}`\n- List partition mappings:\n  `kpartx -l {{whole_disk.img}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (11 subsections)\n- **EXAMPLE**\n- **SEE ALSO**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "kpartx",
        "section": "",
        "mode": "man",
        "summary": "kpartx - Create device maps from partition tables.",
        "synopsis": "kpartx [-a|-d|-u|-l] [-r] [-p] [-f] [-g] [-s|-n] [-v] wholedisk",
        "tldr_summary": "Create device maps from partition tables.",
        "tldr_examples": [
            {
                "description": "Add partition mappings and print created mappings",
                "command": "kpartx -av {{whole_disk.img}}"
            },
            {
                "description": "Delete partition mappings",
                "command": "kpartx -d {{whole_disk.img}}"
            },
            {
                "description": "List partition mappings",
                "command": "kpartx -l {{whole_disk.img}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-d",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-f",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-g",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": ""
            }
        ],
        "examples": [
            "To mount all the partitions in a raw disk image:",
            "kpartx -av disk.img",
            "This will output lines such as:",
            "add map loop1p1 (254:4): 0 409597 linear 7:1 3",
            "The  loop1p1  is  the name of a device file under /dev/mapper which you can use to access the",
            "partition, for example to fsck it:",
            "fsck /dev/mapper/loop1p1",
            "When you're done, you need to remove the devices:",
            "kpartx -d disk.img"
        ],
        "see_also": [
            {
                "name": "multipath",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/multipath/8/json"
            },
            {
                "name": "multipathd",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/multipathd/8/json"
            },
            {
                "name": "hotplug",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/hotplug/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-a",
                        "lines": 1,
                        "flag": "-a"
                    },
                    {
                        "name": "-d",
                        "lines": 1,
                        "flag": "-d"
                    },
                    {
                        "name": "-u",
                        "lines": 1,
                        "flag": "-u"
                    },
                    {
                        "name": "-l",
                        "lines": 1,
                        "flag": "-l"
                    },
                    {
                        "name": "-r",
                        "lines": 1,
                        "flag": "-r"
                    },
                    {
                        "name": "-p",
                        "lines": 1,
                        "flag": "-p"
                    },
                    {
                        "name": "-f",
                        "lines": 1,
                        "flag": "-f"
                    },
                    {
                        "name": "-g",
                        "lines": 1,
                        "flag": "-g"
                    },
                    {
                        "name": "-s",
                        "lines": 1,
                        "flag": "-s"
                    },
                    {
                        "name": "-n",
                        "lines": 1,
                        "flag": "-n"
                    },
                    {
                        "name": "-v",
                        "lines": 1,
                        "flag": "-v"
                    }
                ]
            },
            {
                "name": "EXAMPLE",
                "lines": 17,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 8,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "kpartx - Create device maps from partition tables.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "kpartx [-a|-d|-u|-l] [-r] [-p] [-f] [-g] [-s|-n] [-v] wholedisk\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This  tool,  derived  from  util-linux' partx, reads partition tables on specified device and\ncreate device maps over partitions segments detected. It is called from hotplug  upon  device\nmaps creation and deletion.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-a",
                        "content": "",
                        "flag": "-a"
                    },
                    {
                        "name": "-d",
                        "content": "",
                        "flag": "-d"
                    },
                    {
                        "name": "-u",
                        "content": "",
                        "flag": "-u"
                    },
                    {
                        "name": "-l",
                        "content": "",
                        "flag": "-l"
                    },
                    {
                        "name": "-r",
                        "content": "",
                        "flag": "-r"
                    },
                    {
                        "name": "-p",
                        "content": "",
                        "flag": "-p"
                    },
                    {
                        "name": "-f",
                        "content": "",
                        "flag": "-f"
                    },
                    {
                        "name": "-g",
                        "content": "",
                        "flag": "-g"
                    },
                    {
                        "name": "-s",
                        "content": "",
                        "flag": "-s"
                    },
                    {
                        "name": "-n",
                        "content": "",
                        "flag": "-n"
                    },
                    {
                        "name": "-v",
                        "content": "",
                        "flag": "-v"
                    }
                ]
            },
            "EXAMPLE": {
                "content": "To mount all the partitions in a raw disk image:\n\nkpartx -av disk.img\n\nThis will output lines such as:\n\nadd map loop1p1 (254:4): 0 409597 linear 7:1 3\n\nThe  loop1p1  is  the name of a device file under /dev/mapper which you can use to access the\npartition, for example to fsck it:\n\nfsck /dev/mapper/loop1p1\n\nWhen you're done, you need to remove the devices:\n\nkpartx -d disk.img\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "multipath(8) multipathd(8) hotplug(8)\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "This man page was assembled By Patrick Caulfield for the Debian project.\n\nmultipath-tools was developed by Christophe Varoqui <christophe.varoqui@opensvc.com> and oth‐\ners.\n\n\n\nLinux                                        2016-10-28                                    KPARTX(8)",
                "subsections": []
            }
        }
    }
}