> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siderolabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Boot Loader

> Overview of the Talos boot process and boot loader configuration.

export const VersionWarningBanner = () => {
  const latestVersion = "v1.13";
  const [latestUrl, setLatestUrl] = useState(null);
  const [currentVersion, setCurrentVersion] = useState(null);
  const [isBeta, setIsBeta] = useState(false);
  const parseVersion = v => v.replace("v", "").split(".").map(Number);
  const isGreaterVersion = (a, b) => {
    const [aMajor, aMinor] = parseVersion(a);
    const [bMajor, bMinor] = parseVersion(b);
    if (aMajor > bMajor) return true;
    if (aMajor === bMajor && aMinor > bMinor) return true;
    return false;
  };
  useEffect(() => {
    if (typeof window === "undefined") return;
    const {pathname, hash, search} = window.location;
    const match = pathname.match(/\/talos\/(v\d+\.\d+)\//);
    if (!match) return;
    const detectedVersion = match[1];
    if (detectedVersion === latestVersion) return;
    setCurrentVersion(detectedVersion);
    if (isGreaterVersion(detectedVersion, latestVersion)) {
      setIsBeta(true);
    }
    const newPath = pathname.replace(`/talos/${detectedVersion}/`, `/talos/${latestVersion}/`);
    setLatestUrl(`${newPath}${search}${hash}`);
  }, []);
  if (!latestUrl || !currentVersion) return null;
  return <div className="not-prose sticky top-6 z-50 my-6">
      <div className="border border-yellow-500/30 bg-yellow-500/10 px-4 py-3 rounded-xl">
        <div className="text-sm">
          {isBeta ? <>
              ⚠️ You are viewing a <strong>beta version</strong> of Talos ({currentVersion}).
              This version may be unstable.
              <a href={latestUrl} className="ml-2 underline text-yellow-400 hover:text-yellow-300 font-medium">
                View latest stable version {latestVersion} →
              </a>
            </> : <>
              ⚠️ You are viewing an older version of Talos ({currentVersion}).
              <a href={latestUrl} className="ml-2 underline text-yellow-400 hover:text-yellow-300 font-medium">
                View the latest version {latestVersion} →
              </a>
            </>}
        </div>
      </div>
    </div>;
};

<VersionWarningBanner />

Talos uses two boot loaders based on system architecture and configuration:

* GRUB
* `systemd-boot`

GRUB is used for legacy BIOS systems on x86\_64, while `systemd-boot` is used for UEFI systems on x86\_64 and arm64.

> Note: When upgrading from earlier Talos versions, the existing bootloader is retained.
> Prior to Talos 1.10, GRUB was the default for all systems except SecureBoot images, which used `systemd-boot`.

To check the current bootloader:

```shell theme={null}
$ talosctl get securitystate -o yaml
spec:
    # ...
    bootedWithUKI: true # Indicates systemd-boot is in use
```

## `systemd-boot`

`systemd-boot` is the default bootloader for UEFI systems on x86\_64 and arm64.
It is a lightweight boot manager from the `systemd` project, designed for simplicity and speed.

Talos boots via UKI (Unified Kernel Image), a single binary containing the kernel, initramfs, and kernel command line arguments.
The UKI may include multiple profiles with different kernel arguments, such as regular boot and wiping mode.
These profiles are displayed in the `systemd-boot` menu.

Partition layout for `systemd-boot`:

* `EFI`: Contains the `systemd-boot` bootloader and Talos UKIs.

On UEFI systems, the `EFI` partition is automatically detected by the system firmware.
Since UKIs are EFI binaries, they can also be booted directly from the EFI shell or firmware boot menu, including HTTP boot.

With `systemd-boot`, the `.machine.install.extraKernelArgs` field in the machine configuration is ignored, as kernel arguments are embedded in the UKI and cannot be modified without upgrading the UKI.

## GRUB

GRUB boots Talos using `vmlinuz`, `initramfs`, and kernel arguments stored in its configuration file.

> Note: GRUB was previously used for UEFI systems but is no longer used for new installations starting with Talos 1.10.

Partition layout for GRUB:

* MBR (Master Boot Record): Contains the initial boot code.
* `BIOS`: Contains the GRUB bootloader.
* `EFI`: Contains the GRUB bootloader for UEFI systems (only for upgrades from earlier Talos versions).
* `BOOT`: Contains the GRUB configuration file and Talos boot assets (`vmlinuz`, `initramfs`).

With GRUB, kernel arguments are stored in the GRUB configuration file.
The `.machine.install.extraKernelArgs` field in the machine configuration can be used to modify these arguments, followed by an upgrade.

### Controlling kernel command line behavior

Starting from Talos v1.12, you can control how GRUB determines the kernel command line
using the `.machine.install.grubUseUKICmdline` machine configuration option.

When `grubUseUKICmdline` is set to `true`, GRUB will use the kernel command line
embedded in the Unified Kernel Image (UKI) that was generated during Talos image creation.
This behavior makes it easier to customize kernel parameters when generating boot assets.

When set to `false`, GRUB will ignore the UKI-provided kernel command line and instead
construct its own command line based on Talos defaults and configuration (the legacy behavior).

For existing installations upgrading to v1.12, this option will default to false to preserve the legacy behavior.
