Inside the Boot Chain: ONIE, GRUB, and Two Slots

Site Admin · 4 Dec 2026 · Network Hardware & NOS

ONIE finds an installer or a NOS. GRUB reads one text file to decide which kernel and initrd on which partition become the switch. boot-next edits that file. Nothing in the chain validates it afterwards.

ONIE finds an installer or a NOS. GRUB reads one text file to decide which
kernel and initrd on which partition become the switch. boot-next edits that
file. Nothing in the chain validates it afterwards.

The chain, in order

A Cumulus whitebox boots through five stages:

  1. Boot firmware (BIOS or UEFI) selects the boot device and hands control to
    the bootloader installed there.
  2. ONIE — the Open Network Install Environment — is the vendor's install
    agent. On a provisioned switch it normally chains to the installed NOS; on an
    unprovisioned one it offers discovery and an installer.
  3. GRUB reads /boot/grub/grub.cfg from the boot partition. That file
    contains one or more menuentry blocks, each naming a kernel (linux), an
    initrd (initrd) and a root device.
  4. The kernel mounts the root filesystem of the selected Cumulus partition
    and starts systemd.
  5. Cumulus userspace starts: networking, FRR, switchd, NVUE, the exporters.

The first three stages are the ones that matter here, because they are the ones
that run before there is an operating system to log anything.

Two slots, one config

Cumulus installs a full image into a partition and keeps the previous image in
the other one. On the platforms in NVIDIA's documentation the two slots appear
as partition1 and partition2, backed by devices such as /dev/sda5 and
/dev/sda6. Each slot has its own kernel, initrd and root filesystem.

The selection is not stored in the partition. It is stored in the bootloader
configuration on the running partition's /boot, which tells GRUB which
slot's kernel to load. That is why selecting the other image is a file edit
rather than a firmware variable: nv action boot-next system image other writes
the pending boot target and regenerates the GRUB configuration.

nv show system image is the operator-facing view of the same state: the two
images, their releases and build ids, the disk each occupies, and which one is
selected for the next boot. The output is small, and it is the inventory that
monitoring wants to export.

Where grub.cfg comes from

Two files are involved, and the distinction matters:

The generator is a normal part of the Debian boot stack (grub-mkconfig and
its scripts), driven by the state NVUE maintains. The exact template Cumulus
uses is not public, which is why the write mechanism in #5376220 is described in
this series as inferred: the release note names the corrupted file and the
trigger, not the syscall.

What is not inferred is the consequence. GRUB parses grub.cfg as a script. A
truncated file, a half-written menuentry, or an interleaved block is a syntax
error, and GRUB's response to a syntax error at boot is to stop at the grub>
prompt rather than guess.

Why there is no fallback

A redundant boot design would do one of three things:

Cumulus's documented boot path does none of these by default. The switch has two
images, but one configuration: the file that chooses between them. If that
file is broken, the second image is present and unreachable. The redundancy is
in the payload, not in the selector.

That is the structural reason a single corrupted text file is a total failure
rather than a degraded boot.

The NVUE action pipeline

nv action boot-next system image other is not a shell script an operator can
read. It is an action in NVUE's model:

  1. the CLI or REST call reaches nvued;
  2. nvued starts an action job and records a request id (the release notes tell
    operators to grep /var/log/nvued.log for ActionKey.*boot-next when the
    command appears to time out);
  3. the job updates the pending image selection and regenerates the bootloader
    configuration;
  4. the job reports success or failure to the caller.

Two properties of that pipeline matter for #5376220:

The reader on the other side

prometheus-node-exporter is the standard metrics agent in Cumulus deployments.
Its job is to expose numbers: CPU, interfaces, filesystem, and — in the
configuration that triggers this bug — the image inventory, meaning the
installed images and the pending boot target.

To produce that metric the exporter (or a textfile collector script it runs)
must read the same state the action is writing: nv show system image, the
boot configuration, or the directory that contains it. The release note does not
say which path, and this series does not invent one. What it does say is that
the read and the write are not coordinated, and that the result is a corrupted
grub.cfg.

Next: Part 6 — the smaller boot failures first: the documented Cumulus issues
that already put a switch at grub>, and the ladder that leads to #5376220.