Skip to main content

Module baseline

Module baseline 

Source
Expand description

Β§The baseline installer

This module handles creation of simple root filesystem setups. At the current time it’s very simple - just a direct filesystem (e.g. xfs, ext4, btrfs etc.). It is intended to add opinionated handling of TPM2-bound LUKS too. But that’s about it; other more complex flows should set things up externally and use bootc install to-filesystem.

StructsΒ§

InstallBlockDeviceOpts πŸ”’
Options for installing to a block device
PartitionLayout πŸ”’
Partition numbers resulting from partitioning, used to look up devices after.
RepartPartition πŸ”’
The json output for systemd-repart

EnumsΒ§

BlockSetup πŸ”’
RepartDefinitions πŸ”’
Which repart.d definitions a systemd-repart run reads.

ConstantsΒ§

ABOOT_BOOT_GUID πŸ”’
ABOOT_BOOT_SIZE_MB πŸ”’
ABOOT_VBMETA_GUID πŸ”’
ABOOT_VBMETA_SIZE_MB πŸ”’
BOOTPN_SIZE_MB πŸ”’
CFS_EFIPN_SIZE_MB πŸ”’
EFI Partition size for composefs installations We need more space than ostree as we have UKIs and UKI addons We might also need to store UKIs for pinned deployments
EFIPN_SIZE_MB πŸ”’
MIB πŸ”’
Bytes per MiB, the unit we pin the generated root partition’s size in.
PREPBOOT_GUID πŸ”’
PREPBOOT_LABEL πŸ”’
REPART_CONFIG_DIRS πŸ”’
The repart.d configuration search directories, in descending priority. A definition present in a higher-priority directory masks a same-named one below it (matching systemd’s own semantics).
REPART_INCLUDE_PARTITIONS_MIN_VERSION πŸ”’
The first systemd version that supports systemd-repart --include-partitions=.
REPART_MKFS_OPTIONS_MIN_VERSION πŸ”’
The first systemd version whose systemd-repart honors the SYSTEMD_REPART_MKFS_OPTIONS_<FSTYPE> environment variable (used to enable ext4 fs-verity). Older versions silently ignore it.
REPART_PLANNED_SIZE_DROPIN πŸ”’
The name of the drop-in that pins a definition’s partition to its planned size. Drop-ins apply in name order, so the name sorts after those images usually ship, such as override.conf or 10-size.conf.
UKIBOOT_BOOT_GUID πŸ”’
UKIBOOT_CTL_GUID πŸ”’
UKIBOOT_CTL_SIZE_MB πŸ”’
UKIBOOT_ESP_SIZE_MB πŸ”’

FunctionsΒ§

aboot_partition_labels πŸ”’
aboot_partition_type πŸ”’
aboot_repart_definitions πŸ”’
can_use_systemd_repart πŸ”’
collect_repart_definitions πŸ”’
Collect the selected repart.d definitions into dest_dir, a fresh directory.
generated_root_definition_name πŸ”’
A file name for the root partition definition we generate when the image’s repart.d definitions have none. systemd-repart lays out partitions in the order of their definitions’ names, so it sorts where 50-root.conf would; the random part keeps it from masking a definition of the image, or from being masked by one.
has_systemd_repart πŸ”’
image_repart_partitions πŸ”’
install_create_rootfs πŸ”’
mkfs πŸ”’
need_filtered_definitions πŸ”’
Whether we must emulate --include-partitions= by pre-filtering the definitions ourselves
parse_repart_layout πŸ”’
Parse partition layout from systemd-repart JSON output.
planned_boot_partition_sizes πŸ”’
The partitions other than root that a generic image’s install creates (the ESP and BIOS boot), as the file name of their definition and the size in bytes systemd-repart planned for them with all definitions.
planned_root_size_mib πŸ”’
The size in MiB to pin the root partition we generate to, given a dry run of all definitions in which it has no size limits. systemd-repart gives it the space the other definitions leave, padding included, and shares that by Weight= with any of them that can grow, so the partitions created only on first boot still fit after it. Rounded down to whole MiB.
planned_size_pin πŸ”’
The repart.d drop-in that pins a partition to size bytes.
repart_partition_is_required πŸ”’
Whether a partition (as reported by systemd-repart) is one we must create even for a generic image: root, ESP or BIOS boot.
sfdisk πŸ”’
Use sfdisk to create partitions
systemd_repart πŸ”’
Create partitions using systemd-repart Assumes we have systemd-repart definitions
systemd_repart_aboot πŸ”’
systemd_repart_run πŸ”’
Run systemd-repart on the device and return the parsed JSON output. dry_run: if true, no changes are written to disk. definitions: which repart.d definitions to read.
udev_settle πŸ”’
use_discoverable_partitions πŸ”’
Check whether DPS auto-discovery is enabled. When true, root=UUID= is omitted and systemd-gpt-auto-generator discovers the root partition via its DPS type GUID instead.
validate_aboot_repart_partitions πŸ”’
validate_repart_boot_layout πŸ”’
verify_image_aboot_filesystems πŸ”’
wipefs πŸ”’
write_repart_file πŸ”’
Write the repart.d definition or drop-in name into dir, creating parent directories as needed.