Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Disk Image generator:
disk-image

Mount nameTypeUsage
inputOverlayThe Raptor build target that will be put into the generated image
outputFilePoints to the resulting output file.

Compatibility

TargetCompatible?
Container: systemd-nspawn✅ (raw)
Container: docker
Container: podman
Virtual Machine (UEFI)✅ (raw, qcow2)
Virtual Machine (BIOS)
Physical Machine (UEFI)✅ (raw)
Physical Machine (BIOS)

This builder generates disk images, including a partition table, and separate partitions for /, /boot and /boot/efi.

It uses the Discoverable Partitions Specification1 to make the images compatible with both physical hardware, virtual machines, and systemd-nspawn.

Example

Prerequisites:

  • raptor-builders is cloned to raptor-builders
  • An input target called test.rapt

Raptor.toml

[raptor.link]
rbuild = "raptor-builders"

# Disk image (raw)
[run.disk1]
target = "$rbuild.disk-image" # <-- builder is specified here
input = ["test"]
output = "disk.img"
## implied default:
## env.OUTPUT_FORMAT = "raw"

# Disk image (qcow2)
[run.disk2]
target = "$rbuild.disk-image" # <-- builder is specified here
input = ["test"]
output = "disk.qcow2"
env.OUTPUT_FORMAT = "qcow2"

After this Raptor.toml is in place, call raptor make to build:

sudo raptor make disk1 disk2

When the process is complete, disk.img and disk.qcow2 will be ready for use.


  1. Discoverable Partitions Specification