core/assemble-disk
Populate an existing disk layout with numbered partition images.
Populate an existing disk layout with numbered partition images.
Inputs
-
image -
Kind: file
Unpopulated disk image with a partition table and optional raw firmware.
-
partitions -
Kind: directory
Filesystem images named by their partition numbers, such as 1 and 5.
Outputs
-
image -
Kind: file
Populated disk image, preserving the input geometry and identifiers.
Execution
-
Environment
-
Rugix Bakery
-
Source epoch
-
Consumed
-
Output cache
-
Allowed
Place independently built filesystem images into an existing disk layout. This rule supports GPT and MBR, including logical partitions. It preserves partition identifiers, offsets, empty partitions, and any raw firmware in the input disk.
For example, this composition node populates root partition 5 of an MBR disk:
[execution.rules.disk]
uses = "core/assemble-disk"
inputs.image = { rule = { node = "layout", output = "image" } }
inputs.partitions = { tree = { "5" = { rule = { node = "root", output = "image" } } } }
Partition images are named by their actual partition numbers. Every supplied image must fit its partition. Omitted partitions retain their input contents; extended partition containers cannot receive payloads. The rule writes a fresh disk image without modifying its inputs or using loop devices.