{"id":4071,"date":"2022-12-20T17:39:19","date_gmt":"2022-12-20T20:39:19","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/systemdboot-man7\/"},"modified":"2022-12-20T17:39:19","modified_gmt":"2022-12-20T20:39:19","slug":"systemdboot-man7","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/systemdboot-man7\/","title":{"rendered":"SYSTEMD&minus;BOOT (man7)"},"content":{"rendered":"<h1 align=\"center\">SYSTEMD\u2212BOOT<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#KEY BINDINGS\">KEY BINDINGS<\/a><br \/> <a href=\"#FILES\">FILES<\/a><br \/> <a href=\"#EFI VARIABLES\">EFI VARIABLES<\/a><br \/> <a href=\"#BOOT COUNTING\">BOOT COUNTING<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">systemd-boot, sd-boot \u2212 A simple UEFI boot manager<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212boot<\/b> (short: <b>sd\u2212boot<\/b>) is a simple UEFI boot manager. It provides a graphical menu to select the entry to boot and an editor for the kernel command line. <b>systemd\u2212boot<\/b> supports systems with UEFI firmware only.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd\u2212boot<\/b> loads boot entry information from the EFI system partition (ESP), usually mounted at \/efi\/, \/boot\/, or \/boot\/efi\/ during OS runtime, as well as from the Extended Boot Loader partition if it exists (usually mounted to \/boot\/). Configuration file fragments, kernels, initrds and other EFI images to boot generally need to reside on the ESP or the Extended Boot Loader partition. Linux kernels must be built with <b>CONFIG_EFI_STUB<\/b> to be able to be directly executed as an EFI image. During boot <b>systemd\u2212boot<\/b> automatically assembles a list of boot entries from the following sources:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">\u2022 Boot entries defined with <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">description files located in \/loader\/entries\/ on the ESP and the Extended Boot Loader Partition. These usually describe Linux kernel images with associated initrd images, but alternatively may also describe arbitrary other EFI executables.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 Unified kernel images following the<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">, as executable EFI binaries in \/EFI\/Linux\/ on the ESP and the Extended Boot Loader Partition.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The Microsoft Windows EFI boot manager, if installed<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The Apple macOS boot manager, if installed<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The EFI Shell binary, if installed<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 A reboot into the UEFI firmware setup option, if supported by the firmware<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd\u2212boot<\/b> supports the following features:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 Basic boot manager configuration changes (such as timeout configuration, default boot entry selection, &#8230;) may be made directly from the boot loader UI at boot\u2212time, as well as during system runtime with EFI variables.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The boot manager integrates with the <b>systemctl<\/b> command to implement features such as <b>systemctl reboot \u2212\u2212boot\u2212loader\u2212entry=&#8230;<\/b> (for rebooting into a specific boot menu entry, i.e. &#8220;reboot into Windows&#8221;) and <b>systemctl reboot \u2212\u2212boot\u2212loader\u2212menu=&#8230;<\/b> (for rebooting into the boot loader menu), by implementing the<\/font> <b><font color=\"#0000FF\">Boot Loader Interface<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">. See <b>systemctl<\/b>(1) for details.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 An EFI variable set by the boot loader informs the OS about the ESP partition used during boot. This is then used to automatically mount the correct ESP partition to \/efi\/ or \/boot\/ during OS runtime. See <b>systemd-gpt-auto-generator<\/b>(8) for details.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The boot manager provides information about the boot time spent in UEFI firmware using the<\/font> <b><font color=\"#0000FF\">Boot Loader Interface<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">. This information can be displayed using <b>systemd-analyze<\/b>(1).<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The boot manager implements boot counting and automatic fallback to older, working boot entries on failure. See<\/font> <b><font color=\"#0000FF\">Automatic Boot Assessment<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">\u2022 The boot manager optionally reads a random seed from the ESP partition, combines it with a &#8216;system token&#8217; stored in a persistent EFI variable and derives a random seed to use by the OS as entropy pool initialization, providing a full entropy pool during early boot.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>bootctl<\/b>(1) may be used from a running system to locate the ESP and the Extended Boot Loader Partition, list available entries, and install <b>systemd\u2212boot<\/b> itself.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>kernel-install<\/b>(8) may be used to copy kernel images onto the ESP or the Extended Boot Loader Partition and to generate description files compliant with the Boot Loader Specification.<\/font><\/p>\n<h2>KEY BINDINGS <a name=\"KEY BINDINGS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The following keys may be used in the boot menu:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u00e2 (Up), \u00e2 (Down), j, k, PageUp, PageDown, Home, End<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Navigate up\/down in the entry list<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u00e2\u00b5 (Enter), \u00e2 (Right)<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Boot selected entry<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">d<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Make selected entry the default<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">e<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Edit the kernel command line for selected entry<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">+, t<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Increase the timeout before default entry is booted<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u2212, T<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Decrease the timeout<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">v<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Show systemd\u2212boot, UEFI, and firmware versions<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">P<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Print status<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Q<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Quit<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">h, ?, F1<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Show a help screen<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Ctrl+l<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Reprint the screen<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The following keys may be pressed during bootup or in the boot menu to directly boot a specific entry:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">l<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Linux<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">w<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Windows<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">a<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">macOS<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">s<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">EFI shell<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">1, 2, 3, 4, 5, 6, 7, 8, 9<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Boot entry number 1 &#8230; 9<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The boot menu is shown when a non\u2212zero menu timeout has been configured. If the menu timeout has been set to zero, it is sufficient to press any key \u2014 before the boot loader initializes \u2014 to bring up the boot menu, except for the keys listed immediately above as they directly boot into the selected boot menu item. Note that depending on the firmware implementation the time window where key presses are accepted before the boot loader initializes might be short. If the window is missed, reboot and try again, possibly pressing a suitable key (e.g. the space bar) continuously; on most systems it should be possible to hit the time window after a few attempts. To avoid this problem, consider setting a non\u2212zero timeout, thus showing the boot menu unconditionally. Some desktop environments might offer an option to directly boot into the boot menu, to avoid the problem altogether. Alternatively, use the command line <b>systemctl reboot \u2212\u2212boot\u2212loader\u2212menu=0<\/b> from the shell.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">In the editor, most keys simply insert themselves, but the following keys may be used to perform additional actions:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u00e2 (Left), \u00e2 (Right), Home, End<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Navigate left\/right<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Esc<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Abort the edit and quit the editor<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Ctrl+k<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Clear the command line<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Ctrl+w, Alt+Backspace<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Delete word backwards<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Alt+d<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Delete word forwards<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">\u00e2\u00b5 (Enter)<\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Boot entry with the edited command line<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Note that unless configured otherwise in the UEFI firmware, systemd\u2212boot will use the US keyboard layout, so key labels might not match for keys like +\/\u2212.<\/font><\/p>\n<h2>FILES <a name=\"FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The files <b>systemd\u2212boot<\/b> processes generally reside on the UEFI ESP which is usually mounted to \/efi\/, \/boot\/ or \/boot\/efi\/ during OS runtime. It also processes files on the Extended Boot Loader partition which is typically mounted to \/boot\/, if it exists. <b>systemd\u2212boot<\/b> reads runtime configuration such as the boot timeout and default entry from \/loader\/loader.conf on the ESP (in combination with data read from EFI variables). See <b>loader.conf<\/b>(5). Boot entry description files following the<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">are read from \/loader\/entries\/ on the ESP and the Extended Boot Loader partition. Unified kernel boot entries following the<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">are read from \/EFI\/Linux\/ on the ESP and the Extended Boot Loader partition. Optionally, a random seed for early boot entropy pool provisioning is stored in \/loader\/random\u2212seed in the ESP.<\/font><\/p>\n<h2>EFI VARIABLES <a name=\"EFI VARIABLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The following EFI variables are defined, set and read by <b>systemd\u2212boot<\/b>, under the vendor UUID &#8220;4a67b082\u22120a4c\u221241cf\u2212b6c7\u2212440b29bb8c4f&#8221;, for communication between the OS and the boot loader:<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderBootCountPath<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">If boot counting is enabled, contains the path to the file in whose name the boot counters are encoded. Set by the boot loader. <b>systemd-bless-boot.service<\/b>(8) uses this information to mark a boot as successful as determined by the successful activation of the boot\u2212complete.target target unit.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderConfigTimeout<\/i>, <i>LoaderConfigTimeoutOneShot<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The menu timeout in seconds. Read by the boot loader. <i>LoaderConfigTimeout<\/i> is maintained persistently, while <i>LoaderConfigTimeoutOneShot<\/i> is a one\u2212time override which is read once (in which case it takes precedence over <i>LoaderConfigTimeout<\/i>) and then removed. <i>LoaderConfigTimeout<\/i> may be manipulated with the t\/T keys, see above.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderDevicePartUUID<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Contains the partition UUID of the EFI System Partition the boot loader was run from. Set by the boot loader. <b>systemd-gpt-auto-generator<\/b>(8) uses this information to automatically find the disk booted from, in order to discover various other partitions on the same disk automatically.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderEntries<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A list of the identifiers of all discovered boot loader entries. Set by the boot loader.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderEntryDefault<\/i>, <i>LoaderEntryOneShot<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The identifier of the default boot loader entry. Set primarily by the OS and read by the boot loader. <i>LoaderEntryOneShot<\/i> sets the default entry for the next boot only, while <i>LoaderEntryDefault<\/i> sets it persistently for all future boots. <b>bootctl<\/b>(1)&#8217;s <b>set\u2212default<\/b> and <b>set\u2212oneshot<\/b> commands make use of these variables. The boot loader modifies <i>LoaderEntryDefault<\/i> on request, when the d key is used, see above.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderEntrySelected<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The identifier of the boot loader entry currently being booted. Set by the boot loader.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderFeatures<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A set of flags indicating the features the boot loader supports. Set by the boot loader. Use <b>bootctl<\/b>(1) to view this data.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderFirmwareInfo<\/i>, <i>LoaderFirmwareType<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Brief firmware information. Set by the boot loader. Use <b>bootctl<\/b>(1) to view this data.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderImageIdentifier<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">The path of executable of the boot loader used for the current boot, relative to the EFI System Partition&#8217;s root directory. Set by the boot loader. Use <b>bootctl<\/b>(1) to view this data.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderInfo<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Brief information about the boot loader. Set by the boot loader. Use <b>bootctl<\/b>(1) to view this data.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderTimeExecUSec<\/i>, <i>LoaderTimeInitUSec<\/i>, <i>LoaderTimeMenuUsec<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">Information about the time spent in various parts of the boot loader. Set by the boot loader. Use <b>systemd-analyze<\/b>(1) to view this data.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderRandomSeed<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A binary random seed <b>systemd\u2212boot<\/b> may optionally pass to the OS. This is a volatile EFI variable that is hashed at boot from the combination of a random seed stored in the ESP (in \/loader\/random\u2212seed) and a &#8220;system token&#8221; persistently stored in the EFI variable <i>LoaderSystemToken<\/i> (see below). During early OS boot the system manager reads this variable and passes it to the OS kernel&#8217;s random pool, crediting the full entropy it contains. This is an efficient way to ensure the system starts up with a fully initialized kernel random pool \u2014 as early as the initial RAM disk phase. <b>systemd\u2212boot<\/b> reads the random seed from the ESP, combines it with the &#8220;system token&#8221;, and both derives a new random seed to update in\u2212place the seed stored in the ESP, and the random seed to pass to the OS from it via SHA256 hashing in counter mode. This ensures that different physical systems that boot the same &#8220;golden&#8221; OS image \u2014 i.e. containing the same random seed file in the ESP \u2014 will still pass a different random seed to the OS. It is made sure the random seed stored in the ESP is fully overwritten before the OS is booted, to ensure different random seed data is used between subsequent boots.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">See<\/font> <b><font color=\"#0000FF\">Random Seeds<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">for further information.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LoaderSystemToken<\/i><\/font><\/p>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">A binary random data field, that is used for generating the random seed to pass to the OS (see above). Note that this random data is generally only generated once, during OS installation, and is then never updated again.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Many of these variables are defined by the<\/font> <b><font color=\"#0000FF\">Boot Loader Interface<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>BOOT COUNTING <a name=\"BOOT COUNTING\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>systemd\u2212boot<\/b> implements a simple boot counting mechanism on top of the<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">, for automatic and unattended fallback to older kernel versions\/boot loader entries when a specific entry continuously fails. Any boot loader entry file and unified kernel image file that contains a &#8220;+&#8221; followed by one or two numbers (if two they need to be separated by a &#8220;\u2212&#8221;), before the .conf or .efi suffix is subject to boot counting: the first of the two numbers (&#8216;tries left&#8217;) is decreased by one on every boot attempt, the second of the two numbers (&#8216;tries done&#8217;) is increased by one (if &#8216;tries done&#8217; is absent it is considered equivalent to 0). Depending on the current value of these two counters the boot entry is considered to be in one of three states:<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">1. If the &#8216;tries left&#8217; counter of an entry is greater than zero the entry is considered to be in &#8216;indeterminate&#8217; state. This means the entry has not completed booting successfully yet, but also hasn&#8217;t been determined not to work.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">2. If the &#8216;tries left&#8217; counter of an entry is zero it is considered to be in &#8216;bad&#8217; state. This means no further attempts to boot this item will be made (that is, unless all other boot entries are also in &#8216;bad&#8217; state), as all attempts to boot this entry have not completed successfully.<\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">3. If the &#8216;tries left&#8217; and &#8216;tries done&#8217; counters of an entry are absent it is considered to be in &#8216;good&#8217; state. This means further boot counting for the entry is turned off, as it successfully booted at least once. The <b>systemd-bless-boot.service<\/b>(8) service moves the currently booted entry from &#8216;indeterminate&#8217; into &#8216;good&#8217; state when a boot attempt completed successfully.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Generally, when new entries are added to the boot loader, they first start out in &#8216;indeterminate&#8217; state, i.e. with a &#8216;tries left&#8217; counter greater than zero. The boot entry remains in this state until either it managed to complete a full boot successfully at least once (in which case it will be in &#8216;good&#8217; state) \u2014 or the &#8216;tries left&#8217; counter reaches zero (in which case it will be in &#8216;bad&#8217; state).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Example: let&#8217;s say a boot loader entry file foo.conf is set up for 3 boot tries. The installer will hence create it under the name foo+3.conf. On first boot, the boot loader will rename it to foo+2\u22121.conf. If that boot does not complete successfully, the boot loader will rename it to foo+1\u22122.conf on the following boot. If that fails too, it will finally be renamed foo+0\u22123.conf by the boot loader on next boot, after which it will be considered &#8216;bad&#8217;. If the boot succeeds however the entry file will be renamed to foo.conf by the OS, so that it is considered &#8216;good&#8217; from then on.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The boot menu takes the &#8216;tries left&#8217; counter into account when sorting the menu entries: entries in &#8216;bad&#8217; state are ordered at the beginning of the list, and entries in &#8216;good&#8217; or &#8216;indeterminate&#8217; at the end. The user can freely choose to boot any entry of the menu, including those already marked &#8216;bad&#8217;. If the menu entry to boot is automatically determined, this means that &#8216;good&#8217; or &#8216;indeterminate&#8217; entries are generally preferred (as the bottom item of the menu is the one booted by default), and &#8216;bad&#8217; entries will only be considered if there are no &#8216;good&#8217; or &#8216;indeterminate&#8217; entries left.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <b>kernel-install<\/b>(8) kernel install framework optionally sets the initial &#8216;tries left&#8217; counter to the value specified in \/etc\/kernel\/tries when a boot loader entry is first created.<\/font><\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>bootctl<\/b>(1), <b>loader.conf<\/b>(5), <b>systemd-bless-boot.service<\/b>(8), <b>systemd-boot-system-token.service<\/b>(8), <b>kernel-install<\/b>(8),<\/font> <b><font color=\"#0000FF\">Boot Loader Specification<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">,<\/font> <b><font color=\"#0000FF\">Boot Loader Interface<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Boot Loader Specification<\/font><\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/BOOT_LOADER_SPECIFICATION<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Boot Loader Interface<\/font><\/p>\n<\/td>\n<td width=\"51%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/BOOT_LOADER_INTERFACE<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Automatic Boot Assessment<\/font><\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/AUTOMATIC_BOOT_ASSESSMENT<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">4.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"18%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Random Seeds<\/font><\/p>\n<\/td>\n<td width=\"65%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/systemd.io\/RANDOM_SEEDS<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  systemd-boot, sd-boot \u2212 A simple UEFI boot manager <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[971],"tags":[973,972,1151],"class_list":["post-4071","post","type-post","status-publish","format-standard","hentry","category-7-miscelanea","tag-973","tag-man7","tag-systemd-boot"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4071","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4071"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4071\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4071"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4071"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4071"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}