Skip to content

Commit 3f2bd82

Browse files
committed
bls: introduce "uki" and "uki-url" keys to the BLS spec
This is used by systemd/systemd#36314 to make networking boot work nicely within the BLS constructs. The "uki" stanza also should have uses in a world where a single UKI shall be invoked by multiple locally defined menu entries, for example on nixos or ostree systems, where each commit shall synthesize a separate menu entry, often referencing the same UKI.
1 parent c908c28 commit 3f2bd82

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

specs/boot_loader_specification.md

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,36 @@ The following keys are recognized:
279279
* `efi` refers to an arbitrary EFI program. If this key is set, and the system
280280
is not an EFI system, this entry should be hidden.
281281

282+
* `uki` is a combination of the `linux` key, the `efi` key and Type #2 semantics: if this key is used the
283+
specified path shall refer to a [unified kernel image (UKI)](unified_kernel_image.md). This informs the
284+
boot loader to use UKI semantics (as exposed by Type #2) even though it is referenced via a Type #1
285+
entry. This is useful to parameterize the UKI differently, to place it in a directory other than
286+
`/EFI/Linux`, or to share a single UKI image among multiple menu entries.
287+
288+
If this key is set, and the system is not an EFI system, this entry should be hidden.
289+
290+
Example: `uki /fooos/bar.efi`
291+
292+
* `uki-url` is similar to `uki`, but takes an RFC 3986 URI instead of a file path. It may be used to
293+
reference remotely stored UKIs, which shall be downloaded using network boot support of the boot loader or
294+
firmware on activation.
295+
296+
Example: `uki-url http://example.com/fooos.efi`
297+
298+
Optionally, in place of an URL a simple filename prefixed with `:` may be specified. In this case, if the
299+
boot loader itself was booted via the network and knows its originating URL it shall replace the last
300+
path component of that URL (i.e. the filename part) with the specified filename.
301+
302+
Example: `uki-url :fooos.efi`
303+
304+
This example would mean: if the boot loader was acquired from `http://example.com/somedir/fooosbootldr.img`
305+
such a line would be treated equivalent to `uki-url http://example.com/somedir/fooos.efi`.
306+
307+
If this key is set, and the system is not an EFI system, or the boot loader/firmware does not support
308+
network booting, this entry *shall* be hidden. Similarly, if the `:` syntax is used, but the boot loader
309+
was not invoked via network booting (or doesn't know its originating URL) entries of this type *shall* be
310+
hidden.
311+
282312
* `options` shall contain kernel parameters to pass to the Linux kernel to
283313
spawn. This key is optional and may appear more than once in which case all
284314
specified parameters are combined in the order they are listed.
@@ -318,10 +348,10 @@ key. Here is an example for a complete drop-in file:
318348
linux /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux
319349
initrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd
320350

321-
On EFI systems all Linux kernel images should be EFI images. In order to
322-
increase compatibility with EFI systems it is highly recommended only to
323-
install EFI kernel images, even on non-EFI systems, if that's applicable and
324-
supported on the specific architecture.
351+
On EFI systems all Linux kernel images *should* be EFI PE images, or in case of the `uki` or `uki-url` key
352+
*must* be EFI PE images conforming to the [UKI Specification](unified_kernel_image.md). In order to increase
353+
compatibility with EFI systems it is highly recommended only to install EFI kernel images, even on non-EFI
354+
systems, if that's applicable and supported on the specific architecture.
325355

326356
Conversely, in order to increase compatibility it is recommended to install
327357
generic kernel images that make few assumptions about the firmware they run on,

0 commit comments

Comments
 (0)