{
  "slug": "ubi",
  "term": "Unsorted Block Images (UBI)",
  "aliases": [
    "UBI",
    "Unsorted Block Images"
  ],
  "definition": "UBI is the Linux raw-flash volume layer that maps logical eraseblocks to physical eraseblocks and manages wear and bad blocks above MTD.",
  "note": "UBI sits between Memory Technology Devices (MTD), which exposes raw flash, and consumers such as UBIFS. Its logical eraseblocks (LEBs) can be mapped to different physical eraseblocks (PEBs); a logical location is therefore not a fixed chip address. [architecture]\n\nUBI supplies volumes, not files and directories. UBIFS supplies the filesystem above them. UBI's eraseblock interface is not the ordinary sector interface of an SSD; Linux v6.16 offers a separate, optional read-only ubiblock interface for block-oriented consumers. [ubi]\n\nBad-block handling has finite replacement capacity. In Linux v6.16, the erase-worker path can use available unallocated eraseblocks after its dedicated bad-block reserve is empty; when neither is available it switches to read-only mode. This protects the write path, not the readability of every stored byte. [wl]\n\nWhole-volume updates use a persistent marker. Interruption can leave the volume unavailable for normal I/O until another update; single-LEB atomic change is a separate operation. Do not infer image rollback from the existence of the latter API. [ubi-update]",
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "related": [
    "ubifs",
    "nand-flash",
    "nand-erase-block",
    "bad-block-management",
    "wear-leveling",
    "ubi-atomic-leb-change"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-21",
  "citations": [
    {
      "id": "architecture",
      "title": "Linux kernel, UBIFS Authentication Support: MTD, UBI and UBIFS",
      "url": "https://docs.kernel.org/filesystems/ubifs-authentication.html",
      "accessed": "2026-10-21"
    },
    {
      "id": "ubi",
      "title": "Linux v6.16, UBI configuration: volume management and read-only block interface",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/Kconfig",
      "accessed": "2026-10-21"
    },
    {
      "id": "wl",
      "title": "Linux v6.16, UBI wear leveling: erase-worker replacement-pool handling",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/wl.c",
      "accessed": "2026-10-21"
    },
    {
      "id": "ubi-update",
      "title": "Linux v6.16, UBI volume-update marker and start/update paths",
      "url": "https://raw.githubusercontent.com/torvalds/linux/v6.16/drivers/mtd/ubi/upd.c",
      "accessed": "2026-10-21"
    }
  ],
  "provenance": [
    "Source review of Linux raw-flash layers; this is not an SSD firmware specification or a device-failure experiment."
  ]
}
