Skip to content

Feature: _legacy ​

Description ​

Installs and configures both a UEFI (systemd-boot) and a legacy BIOS (syslinux) bootloader, enabling the image to boot on systems without UEFI firmware.

What it does ​

_legacy installs dracut, systemd-boot, and (on amd64) syslinux, then runs exec.late to configure both bootloaders. Three helper scripts are placed in /usr/local/sbin/:

  • update-bootloaders — Updates both the UEFI and legacy BIOS bootloaders to reflect the current kernel.
  • update-kernel-cmdline — Regenerates kernel command line configuration for both bootloaders.
  • update-syslinux — Specifically updates the syslinux legacy BIOS configuration.

A random seed file (/efi/loader/random-seed) is excluded from the image to prevent entropy pool reuse across cloned images.

Files ​

Files present in this feature and their purpose. See the feature file reference for the semantics of each file type.

FilePurpose
exec.late (ref)Installs and configures the bootloaders and updates bootloader entries during image build.
file.exclude (ref)Removes /efi/loader/random-seed from the image to avoid entropy reuse on cloned instances.
file.include.markers.yaml (ref)Maps files in this feature to test-coverage marker IDs.
info.yaml (ref)Declares type: flag and included/excluded features.
pkg.include (ref)Installs dracut, systemd-boot, and conditionally syslinux on amd64.
file.include/usr/local/sbin/update-bootloaders (file.include)Updates both UEFI and BIOS bootloader entries when the kernel or command line changes.
file.include/usr/local/sbin/update-kernel-cmdline (file.include)Regenerates the kernel command line configuration files used by both bootloaders.
file.include/usr/local/sbin/update-syslinux (file.include)Updates the syslinux configuration for legacy BIOS boot.

_legacy has no include or exclude relationships in its own configuration. It is excluded by _usi, which represents the UEFI-only UKI boot path:

Mutually exclusive with:

  • _usi — the Unified System Image (UKI) boot approach requires UEFI exclusively and is incompatible with the BIOS/syslinux boot path that _legacy adds.

Further reading ​