Blueprints

Blueprints are the format used by image-builder, which is a tool you can use to build your Fedora Minimal with build time customizations. The below examples are short, use case specific, examples of blueprints. You can find more about blueprints at the upstream documentation for image-builder.

The below examples can be put into a file called my-minimal.toml (or any filename you prefer) and passed to image-builder:

$ sudo dnf install -y image-builder
$ sudo image-builder build --blueprint my-minimal.toml minimal-raw-zst
# ...

Packages

Adding some packages to Fedora Minimal to make it yours is the customization most people make. If you want to have your packages come from custom repositories such as RPMfusion, COPR, or vendor repositories, take a look at repository customization as well.

packages = [
    { name = "tmux" },
    { name = "python3" },
]

It’s also possible to refer to composition groups, which are used to group relevant packages together. The following setup mimicks Fedora KDE. Note that this does not turn your built image into Fedora KDE. Fedora KDE artifacts are tested by a group of people, while customizations applied on top of Fedora Minimal are not.

packages = [
    { name = "@kde-desktop-environment" },
    { name = "@kde-apps" },
    { name = "@kde-media" },
    { name = "@kde-pim" },
    { name = "@kde-spin-initial-setup" },
    { name = "@firefox" },
    { name = "@libreoffice" },
    { name = "libreoffice-draw" },
    { name = "libreoffice-math" },
    { name = "fuse" },
    { name = "kde-l10n" },
]

# We need a bit more space than the default 4 GiB for the
# disk image.
customizations.disk.minsize = "10 GiB"

You might be wondering why packages are objects with a name key. That’s because you can also supply version to install a package at a specific version, given that it is available in the repositories.

Repositories

Sometimes you’ll want additional repositories to be used by your image. These values are (mostly) the same as what you would find in a repository configuration for dnf.

[[customizations.repositories]]
id = "example"
name = "An example repository"
baseurls = ["https://example.com/"]
enabled = true
install_from = true

This example will add the example repository to be used when installing packages from your package customization and be configured in the resulting image to be available to dnf.

It is important to note that image-builder makes a distinction between repositories used to assemble the system and those used for the package customization. If you want to enable, or replace, repositories used to assemble the system itself then read the advanced customization page.

Users

You can add, or modify users in the image you are building with the users customization. Users are identified by name. If the user already exists (for example, because one of the packages you installed created the user) it will be modified. If the user doesn’t exist it will be created.

[[customizations.users]]
name = "myuser"
key = "ssh-ed25519 AAxxxAA user@host"

Will create or update the user by the name of myuser setting their SSH authorized keys to the given key. For more options read the upstream documentation for image-builder.

Partitioning

By default Fedora Minimal uses "raw" GPT partitioning with an ext4 root partition mounted at /. This can be changed in the following ways. If you want to know more about partitioning and how it behaves you can read the upstream documentation for image-builder.

btrfs

To build an image that uses btrfs you can use the following blueprint. This mimicks the Fedora Workstation subvolumes.

[[customizations.disk.partitions]]
type = "btrfs"
minsize = "3 GiB"
subvolumes = [
  { name = "root", mountpoint = "/" },
  { name = "home", mountpoint = "/home" },
]

It can be wise to also have /var on a separate subvolume.

lvm

To build an image that uses LVM:

[[customizations.disk.partitions]]
type = "lvm"
minsize = "3 GiB"

This will convert the partition that contains the root mountpoint / to an LVM Volume Group containing a root Logical Volume.

Using a DOS partition table

You can switch from a GPT partitioned disk to one that uses DOS partitioning. This might be necessary to be able to boot on some machines such as the Raspberry Pi 3. For more tricks for specific hardware take a look at hardware support.

[customizations.disk]
type = "dos"