The Boot Loader Specification
@@ -32,10 +32,24 @@
/boot/
was traditionally handled), all installed OSes use the same place for
boot loader menu entries.
For systems where the firmware is able to read file systems directly, the ESP must — and the MBR boot and GPT XBOOTLDR partition should — be a file system -readable by the firmware. For most systems this means VFAT (16 or 32 -bit). Applications accessing both partitions should hence not assume that +readable by the firmware. For most systems this means VFAT (16 or 32 bit). +Applications accessing both partitions should hence not assume that fancier file system features such as symlinks, hardlinks, access control or -case sensitivity are supported.
The $BOOT
Partition Placeholder
+case sensitivity are supported.
Note that the partitions described here are not the exclusive territory of this specification.
+This specification only defines semantics of the /loader/entries/
directory
+(along with the companion file /loader/entries.srel
)
+and the /EFI/Linux/
directory inside the file system,
+but it doesn’t define other contents of the file system.
+Boot loaders, firmware, and other software implementing this specification
+may choose to place other files and directories in the same file system.
+For example,
+boot loaders might install their own boot code on the same partition;
+this is particularly common in the case of the ESP.
+Implementations of this specification must be able to operate correctly if
+files or directories other than /loader/entries/
and /EFI/Linux/
are found in the top level directory.
+Implementations that add their own files or directories to the file systems
+should use well-named directories,
+to make name collisions between multiple users of the file system unlikely.
The $BOOT
Partition Placeholder
#
In the text below, the placeholder $BOOT
will be used to refer to the
partition determined as follows:
On disks with an MBR partition table: → the boot partition, as described above
On disks with a GPT partition table: → the XBOOTLDR partition if it exists
Otherwise, on disks with a GPT partition table: → the ESP
$BOOT
is the primary place to put boot menu entry resources into, but
typically not the only one. Most importantly, boot loaders should also pick up
@@ -62,32 +76,21 @@
the inner autofs
will trigger the outer one. Mounting the two partitions via
autofs
is recommended because the simple VFAT file system has weak data
integrity properties and should remain unmounted whenever possible.)
Boot Loader Entries -#
This specification defines two types of boot loader entries. The first type is -text based, very simple, and suitable for a variety of firmware, architecture -and image types (“Type #1”). The second type is specific to EFI, but allows -single-file images that embed all metadata in the kernel binary itself, which -is useful to cryptographically sign them as one file for the purpose of -SecureBoot (“Type #2”).
Not all boot loader entries will apply to all systems. For example, Type #1 +#
This specification defines two types of boot loader entries. +The first type is text based, very simple, +and suitable for a variety of firmware, architecture and image types (“Type #1”). +The second type is specific to EFI, +but allows single-file images that combine the kernel binary +with the configuration, initrd, and other components of the boot loader entry. +This is also useful because the file can be cryptographically signed +for the purposes of SecureBoot (“Type #2”, Unified Kernel Images).
Not all boot loader entries will apply to all systems. For example, Type #1
entries that use the efi
key and all Type #2 entries only apply to EFI
systems. Entries using the architecture
key might specify an architecture that
doesn’t match the local one. Boot loaders should ignore all entries that don’t
match the local platform and what the boot loader can support, and hide them
from the user. Only entries matching the feature set of boot loader and system
shall be considered and displayed. This allows image builders to put together
-images that transparently support multiple different architectures.
Note that the three partitions described above are not supposed to be the
-exclusive territory of this specification. This specification only defines
-semantics of the /loader/entries/
directory (along with the companion file
-/loader/entries.srel
) and the /EFI/Linux/
directory inside the file system,
-but it doesn’t intend to define contents of the rest of the file system. Boot
-loaders, firmware, and other software implementing this specification may
-choose to place other files and directories in the same file system. For
-example, boot loaders that implement this specification might install their own
-boot code on the same partition; this is particularly common in the case of the
-ESP. Implementations of this specification must be able to operate correctly if
-files or directories other than /loader/entries/
and /EFI/Linux/
are found
-in the top level directory. Implementations that add their own files or
-directories to the file systems should use well-named directories, to make name
-collisions between multiple users of the file system unlikely.
Type #1 Boot Loader Specification Entries
+images that transparently support multiple different architectures.Type #1 Boot Loader Specification Entries
#
/loader/entries/
in $BOOT
is the primary directory containing Type #1
drop-in snippets defining boot entries, one .conf
file for each boot menu
item. Each OS may provide one or more such entries.
If the ESP is separate from $BOOT
it may also contain a /loader/entries/
@@ -113,12 +116,14 @@
with other programs, file names shall be chosen from a restricted character
set: ASCII upper and lower case characters, digits, “+”, “-”, “_” and “.”.
Also, the file names should have a length of at least one and at most 255
-characters (including the file name suffix).
These boot loader menu snippets shall be UNIX-style text files (i.e. lines -separated by a single newline character), in the UTF-8 encoding. The -boot loader menu snippets are loosely inspired by Grub1’s configuration syntax. -Lines beginning with “#” are used for comments and shall be ignored. The first -word of a line is used as key and is separated by one or more spaces from the -value.
Type #1 Boot Loader Entry Keys +characters (including the file name suffix).
These boot loader menu snippets shall be UNIX-style text files +(i.e. lines separated by a single newline character), +in the UTF-8 encoding. +The boot loader menu snippets are loosely inspired by Grub1’s configuration syntax. +Lines beginning with “#” are used for comments and shall be ignored. +The first word of a line is used as key +and is separated by one or more spaces from the value. +The rest of the line contains the value, a literal string.
Type #1 Boot Loader Entry Keys #
The following keys are recognized:
title
is a human-readable title for this menu item to be displayed in the boot menu. It is a good idea to initialize this from thePRETTY_NAME=
of os-release. @@ -138,13 +143,20 @@ (i.e. without any UUID formatting). This key is optional.Example:
machine-id 4098b3f648d74c13b1f04ccfba7798e8
sort-key
is a short string used for sorting entries on display. This should typically be initialized from theIMAGE_ID=
orID=
fields of os-release, -possibly with an additional suffix. This field is optional.Example:
sort-key fedora
linux
is the Linux kernel image to execute and takes a path relative to the -root of the file system containing the boot entry snippet itself. It is -recommended that every distribution creates an entry-token/machine-id and -version specific subdirectory and places its kernels and initrd images there -(see below).Example:
linux /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux
initrd
is the initrdcpio
image to use when executing the kernel. This key -may appear more than once in which case all specified images are used, in the -order they are listed.Example:
initrd 6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd
efi
refers to an arbitrary EFI program. If this key is set, and the system +possibly with an additional suffix. This field is optional.Example:
sort-key fedora
linux
specifies the Linux kernel image to execute. +The value is a path relative to the root of the file system +containing the boot entry snippet itself.It is recommended that every distribution creates +a subdirectory specific to the entry-token or machine-id, +and underneath that, subdirectories specific to the kernel version, +and places places the kernel and initrd images there +(see below).
Example:
linux /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/linux
initrd
specifies the initrd to use when executing the kernel (cpio
image). +The value is a path relative to the root of the file system +containing the boot entry snippet itself. +This key may appear more than once, +in which case all specified images are used, +in the order they are listed.Example:
initrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/initrd +initrd /6a9857a393724b7a981ebb5b8495b9ea/3.8.0-2.fc19.x86_64/modules +
efi
refers to an arbitrary EFI program. If this key is set, and the system is not an EFI system, this entry should be hidden.options
shall contain kernel parameters to pass to the Linux kernel to spawn. This key is optional and may appear more than once in which case all specified parameters are combined in the order they are listed.Example:
options root=UUID=6d3376e4-fc93-4509-95ec-a21d68011da2 quiet
devicetree
refers to the binary device tree to use when executing the diff --git a/specs/configuration_files_specification/index.html b/specs/configuration_files_specification/index.html index 6021bb7..65a4fdf 100644 --- a/specs/configuration_files_specification/index.html +++ b/specs/configuration_files_specification/index.html @@ -1,6 +1,6 @@Configuration Files Specification | UAPI Group Specifications +The purpose of the rules defined here is to allow OS vendors to implement the hermetic-usr pattern, where all vendor files are shipped in the vendor tree itself (/usr/), including configuration files with system defaults, while allowing local or vendor overrides without modifying the original files, for easier management.">Configuration Files Specification | UAPI Group Specifications Configuration Files SpecificationConfiguration Files Specification diff --git a/specs/discoverable_disk_image/index.html b/specs/discoverable_disk_image/index.html index b6c7627..da965d5 100644 --- a/specs/discoverable_disk_image/index.html +++ b/specs/discoverable_disk_image/index.html @@ -1,4 +1,4 @@ -
Discoverable Disk Image | UAPI Group Specifications +Discoverable Disk Image | UAPI Group Specifications Discoverable Disk ImageDiscoverable Disk Image (DDI) diff --git a/specs/discoverable_partitions_specification/index.html b/specs/discoverable_partitions_specification/index.html index 9735c80..ab678e6 100644 --- a/specs/discoverable_partitions_specification/index.html +++ b/specs/discoverable_partitions_specification/index.html @@ -1,6 +1,6 @@
Discoverable Partitions Specification | UAPI Group Specifications +This specification describes the use of GUID Partition Table (GPT) UUIDs to enable automatic discovery of partitions and their intended mountpoints. Traditionally Linux has made little use of partition types, mostly just defining one UUID for file system/data partitions and another one for swap partitions.">Discoverable Partitions Specification | UAPI Group Specifications Discoverable Partitions SpecificationThe Discoverable Partitions Specification (DPS) diff --git a/specs/extension_image/index.html b/specs/extension_image/index.html index d473704..9a195b9 100644 --- a/specs/extension_image/index.html +++ b/specs/extension_image/index.html @@ -1,4 +1,4 @@ -
Extension Images | UAPI Group Specifications +Extension Images | UAPI Group Specifications Extension ImagesExtension Images diff --git a/specs/index.html b/specs/index.html index b4802ed..9373e17 100644 --- a/specs/index.html +++ b/specs/index.html @@ -1,4 +1,4 @@ -
Specs | UAPI Group Specifications +Specs | UAPI Group Specifications Specs diff --git a/specs/linux_tpm_pcr_registry/index.html b/specs/linux_tpm_pcr_registry/index.html index 1dcda71..a325bcc 100644 --- a/specs/linux_tpm_pcr_registry/index.html +++ b/specs/linux_tpm_pcr_registry/index.html @@ -1,6 +1,6 @@Linux TPM PCR Registry | UAPI Group Specifications +PCRs owned by the firmware, i.">Linux TPM PCR Registry | UAPI Group Specifications Linux TPM PCR Registry🔏 Linux TPM PCR Registry 🗒️ diff --git a/specs/sysext/index.html b/specs/sysext/index.html index 186cd68..21ccd58 100644 --- a/specs/sysext/index.html +++ b/specs/sysext/index.html @@ -1,4 +1,4 @@ -
Sysext | UAPI Group Specifications +Sysext | UAPI Group Specifications SysextThis content has moved to diff --git a/specs/unified_kernel_image/index.html b/specs/unified_kernel_image/index.html index d533aa3..c11f1e5 100644 --- a/specs/unified_kernel_image/index.html +++ b/specs/unified_kernel_image/index.html @@ -1,4 +1,4 @@ -
Unified Kernel Image | UAPI Group Specifications +Unified Kernel Image | UAPI Group Specifications Unified Kernel ImageUnified Kernel Image (UKI) diff --git a/specs/version_format_specification/index.html b/specs/version_format_specification/index.html index 1632e2f..9f1cb38 100644 --- a/specs/version_format_specification/index.html +++ b/specs/version_format_specification/index.html @@ -1,6 +1,6 @@
Version Format Specification | UAPI Group Specifications +Version Format # The version string is a sequence of zero or more characters.">Version Format Specification | UAPI Group Specifications Version Format SpecificationVersion Format Specification diff --git a/tags/index.html b/tags/index.html index 40400a2..5fd7691 100644 --- a/tags/index.html +++ b/tags/index.html @@ -1,4 +1,4 @@ -
Tags | UAPI Group Specifications +Tags | UAPI Group Specifications Tags