NDCTL-WRITE-INFOBLOCK(1)
β¨ NDCTL-WRITE-INFOBLOCK β¨
okay bestie, welcome to the ndctl manual β yes, that ndctl, the whole toolkit lives under this manual name π. This page is all about ndctl-write-infoblock, and it's giving "I generate and write an infoblock" energy. Let's get into it π«Ά
πΈ NAME πΈ
ndctl-write-infoblock β generate and write an infoblock β¨
π SYNOPSIS π
ndctl write-infoblock [<namespaceX.Y> | -o <file> | --stdout] [<options>]
π DESCRIPTION π
so like, remember the theory of operation bit in ndctl-create-namespace(1)? π§ The raw capacity of a namespace can encapsulate a personality, aka a mode of operation. And that mode can be set to one of "sector", "fsdax", or "devdax". Each of those modes is defined by an info-block format that uniquely identifies which mode it is. The write-infoblock command knows how to generate an "fsdax" or "devdax" info-block relative to the specified image size. periodt πβοΈ
The generated block can be:
- written to an existing namespace (as long as that namespace is not presently active, bestie π)
- written to a file
- piped to standard-out π
Warning β οΈ β this command is a debug facility. It can generate image files with valid infoblocks, but also invalid infoblocks for testing the kernel π. Use the--offsetand--alignoptions with care, fr fr. Namely,--offsetmust match the actual physical address offset of the namespace it is applied to, and--alignmust be one of the architectures' supported page sizes. no cap π«
π¦ EXAMPLE π¦
ndctl write-infoblock -s 1T -c | ndctl read-infoblock -j
wrote 1 infoblock
[
{
"file":"<stdin>",
"signature":"NVDIMM_PFN_INFO",
"uuid":"42e1d574-76ac-402c-9132-5436e31528c0",
"parent_uuid":"ef83e49c-4c4a-4fae-b908-72e94675b1b7",
"flags":0,
"version":"1.4",
"dataoff":17196646400,
"npfns":264237056,
"mode":2,
"start_pad":0,
"end_trunc":0,
"align":16777216,
"page_size":4096,
"page_struct_size":64
}
]
read 1 infoblock
iconic, honestly β¨
π OPTIONS π
<namespace(s)>β one or morenamespaceX.Ydevice names π. You can also say the keywordallto operate on every namespace in the system, optionally filtered by bus id (see the--bus=option) or region id (see the--region=option).-c,--stdoutβ write the infoblock to stdout π«Ά-o,--output=β write the infoblock to the given file (mutually exclusive with--stdout, so pick one bestie, you can't have both π )-m,--mode=β select the infoblock mode betweenfsdaxanddevdaxπΈ. Seendctl-create-namespace(1)for the details on--mode.-s,--size=β override the default size determined from the size of the file specified to--outputπ. In the--stdoutcase, this option is required (yeah, mandatory, no skipping π).-a,--align=β specify the"align"value in the infoblock π. In the--mode=devdaxcase,"align"designates a page mapping size. And ngl, there is no validation of this value relative to the page mapping capabilities of the platform β so it's on you π.-u,--uuid=β override the default autogenerated UUID with the given value β-M,--map=β select whether the page map array is allocated from the device or from"System RAM"π§ . Defaults to the device. Seendctl-create-namespace(1)for more details.-p,--parent-uuid=β when the infoblock is stored on a labelled namespace, the UUID of the namespace must match the"parent uuid"attribute in the infoblock π. This option defaults to the UUID of the namespace when--outputand--stdoutare not used β otherwise it defaults to a NULL UUID (all zeroes) π«₯.-O,--offset=β by default the assumption is that the infoblock is being written to a namespace or namespace-image that is aligned to its size. Specify this EXPERT/DEBUG option to experiment / test the kernel's handling of namespaces that violate that assumption π³.-r,--region=β aregionXdevice name, or a region id number π. Restrict the operation to the specified region(s). The keywordallcan be specified to indicate the lack of any restriction β however this is the same as not supplying a--regionoption at all, so like, make it make sense π.
π COPYRIGHT π
Copyright Β© 2016 - 2022, Intel Corporation. License GPLv2: GNU GPL version 2 http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. π«‘
π SEE ALSO π
ndctl-create-namespace(1)- UEFI NVDIMM Label Protocol <http://www.uefi.org/sites/default/files/resources/UEFI_Spec_2_7.pdf>
and that's the whole vibe check, bestie π this was the ndctl manual page, version 2026-07-07 β go forth and infoblock responsibly, mwah πβ¨π
π¦ where this page comes from
- fedora 43: ndctl 85-1.fc43 Β· GPL-2.0-only AND LGPL-2.1-only AND CC0-1.0 AND MIT
- fedora 44: ndctl 85-1.fc44 Β· GPL-2.0-only AND LGPL-2.1-only AND CC0-1.0 AND MIT
- ubuntu stonking: ndctl 82-1ubuntu1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms