{
    "content": [
        {
            "type": "text",
            "text": "# sd-boot(7) (man)\n\n**Summary:** systemd-boot, sd-boot - A simple UEFI boot manager\n\n## See Also\n\n- bootctl(1)\n- loader.conf(5)\n- systemd-bless-boot.service(8)\n- token.service(8)\n- kernel-install(8)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **DESCRIPTION** (60 lines)\n- **KEY BINDINGS** (89 lines)\n- **FILES** (11 lines)\n- **EFI VARIABLES** (79 lines)\n- **BOOT COUNTING** (51 lines)\n- **SEE ALSO** (3 lines)\n- **NOTES** (15 lines)\n\n## Full Content\n\n### NAME\n\nsystemd-boot, sd-boot - A simple UEFI boot manager\n\n### DESCRIPTION\n\nsystemd-boot (short: sd-boot) is a simple UEFI boot manager. It provides a graphical menu to\nselect the entry to boot and an editor for the kernel command line.  systemd-boot supports\nsystems with UEFI firmware only.\n\nsystemd-boot loads boot entry information from the EFI system partition (ESP), usually\nmounted at /efi/, /boot/, or /boot/efi/ during OS runtime, as well as from the Extended Boot\nLoader partition if it exists (usually mounted to /boot/). Configuration file fragments,\nkernels, initrds and other EFI images to boot generally need to reside on the ESP or the\nExtended Boot Loader partition. Linux kernels must be built with CONFIGEFISTUB to be able\nto be directly executed as an EFI image. During boot systemd-boot automatically assembles a\nlist of boot entries from the following sources:\n\n•   Boot entries defined with Boot Loader Specification[1] description files located in\n/loader/entries/ on the ESP and the Extended Boot Loader Partition. These usually\ndescribe Linux kernel images with associated initrd images, but alternatively may also\ndescribe arbitrary other EFI executables.\n\n•   Unified kernel images following the Boot Loader Specification[1], as executable EFI\nbinaries in /EFI/Linux/ on the ESP and the Extended Boot Loader Partition.\n\n•   The Microsoft Windows EFI boot manager, if installed\n\n•   The Apple macOS boot manager, if installed\n\n•   The EFI Shell binary, if installed\n\n•   A reboot into the UEFI firmware setup option, if supported by the firmware\n\nsystemd-boot supports the following features:\n\n•   Basic boot manager configuration changes (such as timeout configuration, default boot\nentry selection, ...) may be made directly from the boot loader UI at boot-time, as well\nas during system runtime with EFI variables.\n\n•   The boot manager integrates with the systemctl command to implement features such as\nsystemctl reboot --boot-loader-entry=...  (for rebooting into a specific boot menu entry,\ni.e. \"reboot into Windows\") and systemctl reboot --boot-loader-menu=...  (for rebooting\ninto the boot loader menu), by implementing the Boot Loader Interface[2]. See\nsystemctl(1) for details.\n\n•   An EFI variable set by the boot loader informs the OS about the EFI System Partition used\nduring boot. This is then used to automatically mount the correct EFI System Partition to\n/efi/ or /boot/ during OS runtime. See systemd-gpt-auto-generator(8) for details.\n\n•   The boot manager provides information about the boot time spent in UEFI firmware using\nthe Boot Loader Interface[2]. This information can be displayed using systemd-analyze(1).\n\n•   The boot manager implements boot counting and automatic fallback to older, working boot\nentries on failure. See Automatic Boot Assessment[3].\n\n•   The boot manager optionally reads a random seed from the ESP partition, combines it with\na 'system token' stored in a persistent EFI variable and derives a random seed to use by\nthe OS as entropy pool initialization, providing a full entropy pool during early boot.\n\nbootctl(1) may be used from a running system to locate the ESP and the Extended Boot Loader\nPartition, list available entries, and install systemd-boot itself.\n\nkernel-install(8) may be used to copy kernel images onto the ESP or the Extended Boot Loader\nPartition and to generate description files compliant with the Boot Loader Specification.\n\n### KEY BINDINGS\n\nThe following keys may be used in the boot menu:\n\n↑ (Up), ↓ (Down), j, k, PageUp, PageDown, Home, End\nNavigate up/down in the entry list\n\n↵ (Enter), → (Right)\nBoot selected entry\n\nd\nMake selected entry the default\n\ne\nEdit the kernel command line for selected entry\n\n+, t\nIncrease the timeout before default entry is booted\n\n-, T\nDecrease the timeout\n\nv\nShow systemd-boot, UEFI, and firmware versions\n\nP\nPrint status\n\nQ\nQuit\n\nh, ?, F1\nShow a help screen\n\nCtrl+l\nReprint the screen\n\nThe following keys may be pressed during bootup or in the boot menu to directly boot a\nspecific entry:\n\nl\nLinux\n\nw\nWindows\n\na\nmacOS\n\ns\nEFI shell\n\n1, 2, 3, 4, 5, 6, 7, 8, 9\nBoot entry number 1 ... 9\n\nThe boot menu is shown when a non-zero menu timeout has been configured. If the menu timeout\nhas been set to zero, it is sufficient to press any key — before the boot loader initializes\n— to bring up the boot menu, except for the keys listed immediately above as they directly\nboot into the selected boot menu item. Note that depending on the firmware implementation the\ntime window where key presses are accepted before the boot loader initializes might be short.\nIf the window is missed, reboot and try again, possibly pressing a suitable key (e.g. the\nspace bar) continuously; on most systems it should be possible to hit the time window after a\nfew attempts. To avoid this problem, consider setting a non-zero timeout, thus showing the\nboot menu unconditionally. Some desktop environments might offer an option to directly boot\ninto the boot menu, to avoid the problem altogether. Alternatively, use the command line\nsystemctl reboot --boot-loader-menu=0 from the shell.\n\nIn the editor, most keys simply insert themselves, but the following keys may be used to\nperform additional actions:\n\n← (Left), → (Right), Home, End\nNavigate left/right\n\nEsc\nAbort the edit and quit the editor\n\nCtrl+k\nClear the command line\n\nCtrl+w, Alt+Backspace\nDelete word backwards\n\nAlt+d\nDelete word forwards\n\n↵ (Enter)\nBoot entry with the edited command line\n\nNote that unless configured otherwise in the UEFI firmware, systemd-boot will use the US\nkeyboard layout, so key labels might not match for keys like +/-.\n\n### FILES\n\nThe files systemd-boot processes generally reside on the UEFI ESP which is usually mounted to\n/efi/, /boot/ or /boot/efi/ during OS runtime. It also processes files on the Extended Boot\nLoader partition which is typically mounted to /boot/, if it exists.  systemd-boot reads\nruntime configuration such as the boot timeout and default entry from /loader/loader.conf on\nthe ESP (in combination with data read from EFI variables). See loader.conf(5). Boot entry\ndescription files following the Boot Loader Specification[1] are read from /loader/entries/\non the ESP and the Extended Boot Loader partition. Unified kernel boot entries following the\nBoot Loader Specification[1] are read from /EFI/Linux/ on the ESP and the Extended Boot\nLoader partition. Optionally, a random seed for early boot entropy pool provisioning is\nstored in /loader/random-seed in the ESP.\n\n### EFI VARIABLES\n\nThe following EFI variables are defined, set and read by systemd-boot, under the vendor UUID\n\"4a67b082-0a4c-41cf-b6c7-440b29bb8c4f\", for communication between the OS and the boot loader:\n\nLoaderBootCountPath\nIf boot counting is enabled, contains the path to the file in whose name the boot\ncounters are encoded. Set by the boot loader.  systemd-bless-boot.service(8) uses this\ninformation to mark a boot as successful as determined by the successful activation of\nthe boot-complete.target target unit.\n\nLoaderConfigTimeout, LoaderConfigTimeoutOneShot\nThe menu timeout in seconds. Read by the boot loader.  LoaderConfigTimeout is maintained\npersistently, while LoaderConfigTimeoutOneShot is a one-time override which is read once\n(in which case it takes precedence over LoaderConfigTimeout) and then removed.\nLoaderConfigTimeout may be manipulated with the t/T keys, see above.\n\nLoaderDevicePartUUID\nContains the partition UUID of the EFI System Partition the boot loader was run from. Set\nby the boot loader.  systemd-gpt-auto-generator(8) uses this information to automatically\nfind the disk booted from, in order to discover various other partitions on the same disk\nautomatically.\n\nLoaderEntries\nA list of the identifiers of all discovered boot loader entries. Set by the boot loader.\n\nLoaderEntryDefault, LoaderEntryOneShot\nThe identifier of the default boot loader entry. Set primarily by the OS and read by the\nboot loader.  LoaderEntryOneShot sets the default entry for the next boot only, while\nLoaderEntryDefault sets it persistently for all future boots.  bootctl(1)'s set-default\nand set-oneshot commands make use of these variables. The boot loader modifies\nLoaderEntryDefault on request, when the d key is used, see above.\n\nLoaderEntrySelected\nThe identifier of the boot loader entry currently being booted. Set by the boot loader.\n\nLoaderFeatures\nA set of flags indicating the features the boot loader supports. Set by the boot loader.\nUse bootctl(1) to view this data.\n\nLoaderFirmwareInfo, LoaderFirmwareType\nBrief firmware information. Set by the boot loader. Use bootctl(1) to view this data.\n\nLoaderImageIdentifier\nThe path of executable of the boot loader used for the current boot, relative to the EFI\nSystem Partition's root directory. Set by the boot loader. Use bootctl(1) to view this\ndata.\n\nLoaderInfo\nBrief information about the boot loader. Set by the boot loader. Use bootctl(1) to view\nthis data.\n\nLoaderTimeExecUSec, LoaderTimeInitUSec, LoaderTimeMenuUsec\nInformation about the time spent in various parts of the boot loader. Set by the boot\nloader. Use systemd-analyze(1) to view this data.\n\nLoaderRandomSeed\nA binary random seed systemd-boot may optionally pass to the OS. This is a volatile EFI\nvariable that is hashed at boot from the combination of a random seed stored in the ESP\n(in /loader/random-seed) and a \"system token\" persistently stored in the EFI variable\nLoaderSystemToken (see below). During early OS boot the system manager reads this\nvariable and passes it to the OS kernel's random pool, crediting the full entropy it\ncontains. This is an efficient way to ensure the system starts up with a fully\ninitialized kernel random pool — as early as the initial RAM disk phase.  systemd-boot\nreads the random seed from the ESP, combines it with the \"system token\", and both derives\na new random seed to update in-place the seed stored in the ESP, and the random seed to\npass to the OS from it via SHA256 hashing in counter mode. This ensures that different\nphysical systems that boot the same \"golden\" OS image — i.e. containing the same random\nseed file in the ESP — will still pass a different random seed to the OS. It is made sure\nthe random seed stored in the ESP is fully overwritten before the OS is booted, to ensure\ndifferent random seed data is used between subsequent boots.\n\nSee Random Seeds[4] for further information.\n\nLoaderSystemToken\nA binary random data field, that is used for generating the random seed to pass to the OS\n(see above). Note that this random data is generally only generated once, during OS\ninstallation, and is then never updated again.\n\nMany of these variables are defined by the Boot Loader Interface[2].\n\n### BOOT COUNTING\n\nsystemd-boot implements a simple boot counting mechanism on top of the Boot Loader\nSpecification[1], for automatic and unattended fallback to older kernel versions/boot loader\nentries when a specific entry continuously fails. Any boot loader entry file and unified\nkernel image file that contains a \"+\" followed by one or two numbers (if two they need to be\nseparated by a \"-\"), before the .conf or .efi suffix is subject to boot counting: the first\nof the two numbers ('tries left') is decreased by one on every boot attempt, the second of\nthe two numbers ('tries done') is increased by one (if 'tries done' is absent it is\nconsidered equivalent to 0). Depending on the current value of these two counters the boot\nentry is considered to be in one of three states:\n\n1. If the 'tries left' counter of an entry is greater than zero the entry is considered to\nbe in 'indeterminate' state. This means the entry has not completed booting successfully\nyet, but also hasn't been determined not to work.\n\n2. If the 'tries left' counter of an entry is zero it is considered to be in 'bad' state.\nThis means no further attempts to boot this item will be made (that is, unless all other\nboot entries are also in 'bad' state), as all attempts to boot this entry have not\ncompleted successfully.\n\n3. If the 'tries left' and 'tries done' counters of an entry are absent it is considered to\nbe in 'good' state. This means further boot counting for the entry is turned off, as it\nsuccessfully booted at least once. The systemd-bless-boot.service(8) service moves the\ncurrently booted entry from 'indeterminate' into 'good' state when a boot attempt\ncompleted successfully.\n\nGenerally, when new entries are added to the boot loader, they first start out in\n'indeterminate' state, i.e. with a 'tries left' counter greater than zero. The boot entry\nremains in this state until either it managed to complete a full boot successfully at least\nonce (in which case it will be in 'good' state) — or the 'tries left' counter reaches zero\n(in which case it will be in 'bad' state).\n\nExample: let's say a boot loader entry file foo.conf is set up for 3 boot tries. The\ninstaller will hence create it under the name foo+3.conf. On first boot, the boot loader will\nrename it to foo+2-1.conf. If that boot does not complete successfully, the boot loader will\nrename it to foo+1-2.conf on the following boot. If that fails too, it will finally be\nrenamed foo+0-3.conf by the boot loader on next boot, after which it will be considered\n'bad'. If the boot succeeds however the entry file will be renamed to foo.conf by the OS, so\nthat it is considered 'good' from then on.\n\nThe boot menu takes the 'tries left' counter into account when sorting the menu entries:\nentries in 'bad' state are ordered at the beginning of the list, and entries in 'good' or\n'indeterminate' at the end. The user can freely choose to boot any entry of the menu,\nincluding those already marked 'bad'. If the menu entry to boot is automatically determined,\nthis means that 'good' or 'indeterminate' entries are generally preferred (as the bottom item\nof the menu is the one booted by default), and 'bad' entries will only be considered if there\nare no 'good' or 'indeterminate' entries left.\n\nThe kernel-install(8) kernel install framework optionally sets the initial 'tries left'\ncounter to the value specified in /etc/kernel/tries when a boot loader entry is first\ncreated.\n\n### SEE ALSO\n\nbootctl(1), loader.conf(5), systemd-bless-boot.service(8), systemd-boot-system-\ntoken.service(8), kernel-install(8), Boot Loader Specification[1], Boot Loader Interface[2]\n\n### NOTES\n\n1. Boot Loader Specification\nhttps://systemd.io/BOOTLOADERSPECIFICATION\n\n2. Boot Loader Interface\nhttps://systemd.io/BOOTLOADERINTERFACE\n\n3. Automatic Boot Assessment\nhttps://systemd.io/AUTOMATICBOOTASSESSMENT\n\n4. Random Seeds\nhttps://systemd.io/RANDOMSEEDS\n\n\n\nsystemd 249                                                                          SYSTEMD-BOOT(7)\n\n"
        }
    ],
    "structuredContent": {
        "command": "sd-boot",
        "section": "7",
        "mode": "man",
        "summary": "systemd-boot, sd-boot - A simple UEFI boot manager",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "bootctl",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/bootctl/1/json"
            },
            {
                "name": "loader.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/loader.conf/5/json"
            },
            {
                "name": "systemd-bless-boot.service",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-bless-boot.service/8/json"
            },
            {
                "name": "token.service",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/token.service/8/json"
            },
            {
                "name": "kernel-install",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/kernel-install/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 60,
                "subsections": []
            },
            {
                "name": "KEY BINDINGS",
                "lines": 89,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "EFI VARIABLES",
                "lines": 79,
                "subsections": []
            },
            {
                "name": "BOOT COUNTING",
                "lines": 51,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 15,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "systemd-boot, sd-boot - A simple UEFI boot manager\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "systemd-boot (short: sd-boot) is a simple UEFI boot manager. It provides a graphical menu to\nselect the entry to boot and an editor for the kernel command line.  systemd-boot supports\nsystems with UEFI firmware only.\n\nsystemd-boot loads boot entry information from the EFI system partition (ESP), usually\nmounted at /efi/, /boot/, or /boot/efi/ during OS runtime, as well as from the Extended Boot\nLoader partition if it exists (usually mounted to /boot/). Configuration file fragments,\nkernels, initrds and other EFI images to boot generally need to reside on the ESP or the\nExtended Boot Loader partition. Linux kernels must be built with CONFIGEFISTUB to be able\nto be directly executed as an EFI image. During boot systemd-boot automatically assembles a\nlist of boot entries from the following sources:\n\n•   Boot entries defined with Boot Loader Specification[1] description files located in\n/loader/entries/ on the ESP and the Extended Boot Loader Partition. These usually\ndescribe Linux kernel images with associated initrd images, but alternatively may also\ndescribe arbitrary other EFI executables.\n\n•   Unified kernel images following the Boot Loader Specification[1], as executable EFI\nbinaries in /EFI/Linux/ on the ESP and the Extended Boot Loader Partition.\n\n•   The Microsoft Windows EFI boot manager, if installed\n\n•   The Apple macOS boot manager, if installed\n\n•   The EFI Shell binary, if installed\n\n•   A reboot into the UEFI firmware setup option, if supported by the firmware\n\nsystemd-boot supports the following features:\n\n•   Basic boot manager configuration changes (such as timeout configuration, default boot\nentry selection, ...) may be made directly from the boot loader UI at boot-time, as well\nas during system runtime with EFI variables.\n\n•   The boot manager integrates with the systemctl command to implement features such as\nsystemctl reboot --boot-loader-entry=...  (for rebooting into a specific boot menu entry,\ni.e. \"reboot into Windows\") and systemctl reboot --boot-loader-menu=...  (for rebooting\ninto the boot loader menu), by implementing the Boot Loader Interface[2]. See\nsystemctl(1) for details.\n\n•   An EFI variable set by the boot loader informs the OS about the EFI System Partition used\nduring boot. This is then used to automatically mount the correct EFI System Partition to\n/efi/ or /boot/ during OS runtime. See systemd-gpt-auto-generator(8) for details.\n\n•   The boot manager provides information about the boot time spent in UEFI firmware using\nthe Boot Loader Interface[2]. This information can be displayed using systemd-analyze(1).\n\n•   The boot manager implements boot counting and automatic fallback to older, working boot\nentries on failure. See Automatic Boot Assessment[3].\n\n•   The boot manager optionally reads a random seed from the ESP partition, combines it with\na 'system token' stored in a persistent EFI variable and derives a random seed to use by\nthe OS as entropy pool initialization, providing a full entropy pool during early boot.\n\nbootctl(1) may be used from a running system to locate the ESP and the Extended Boot Loader\nPartition, list available entries, and install systemd-boot itself.\n\nkernel-install(8) may be used to copy kernel images onto the ESP or the Extended Boot Loader\nPartition and to generate description files compliant with the Boot Loader Specification.\n",
                "subsections": []
            },
            "KEY BINDINGS": {
                "content": "The following keys may be used in the boot menu:\n\n↑ (Up), ↓ (Down), j, k, PageUp, PageDown, Home, End\nNavigate up/down in the entry list\n\n↵ (Enter), → (Right)\nBoot selected entry\n\nd\nMake selected entry the default\n\ne\nEdit the kernel command line for selected entry\n\n+, t\nIncrease the timeout before default entry is booted\n\n-, T\nDecrease the timeout\n\nv\nShow systemd-boot, UEFI, and firmware versions\n\nP\nPrint status\n\nQ\nQuit\n\nh, ?, F1\nShow a help screen\n\nCtrl+l\nReprint the screen\n\nThe following keys may be pressed during bootup or in the boot menu to directly boot a\nspecific entry:\n\nl\nLinux\n\nw\nWindows\n\na\nmacOS\n\ns\nEFI shell\n\n1, 2, 3, 4, 5, 6, 7, 8, 9\nBoot entry number 1 ... 9\n\nThe boot menu is shown when a non-zero menu timeout has been configured. If the menu timeout\nhas been set to zero, it is sufficient to press any key — before the boot loader initializes\n— to bring up the boot menu, except for the keys listed immediately above as they directly\nboot into the selected boot menu item. Note that depending on the firmware implementation the\ntime window where key presses are accepted before the boot loader initializes might be short.\nIf the window is missed, reboot and try again, possibly pressing a suitable key (e.g. the\nspace bar) continuously; on most systems it should be possible to hit the time window after a\nfew attempts. To avoid this problem, consider setting a non-zero timeout, thus showing the\nboot menu unconditionally. Some desktop environments might offer an option to directly boot\ninto the boot menu, to avoid the problem altogether. Alternatively, use the command line\nsystemctl reboot --boot-loader-menu=0 from the shell.\n\nIn the editor, most keys simply insert themselves, but the following keys may be used to\nperform additional actions:\n\n← (Left), → (Right), Home, End\nNavigate left/right\n\nEsc\nAbort the edit and quit the editor\n\nCtrl+k\nClear the command line\n\nCtrl+w, Alt+Backspace\nDelete word backwards\n\nAlt+d\nDelete word forwards\n\n↵ (Enter)\nBoot entry with the edited command line\n\nNote that unless configured otherwise in the UEFI firmware, systemd-boot will use the US\nkeyboard layout, so key labels might not match for keys like +/-.\n",
                "subsections": []
            },
            "FILES": {
                "content": "The files systemd-boot processes generally reside on the UEFI ESP which is usually mounted to\n/efi/, /boot/ or /boot/efi/ during OS runtime. It also processes files on the Extended Boot\nLoader partition which is typically mounted to /boot/, if it exists.  systemd-boot reads\nruntime configuration such as the boot timeout and default entry from /loader/loader.conf on\nthe ESP (in combination with data read from EFI variables). See loader.conf(5). Boot entry\ndescription files following the Boot Loader Specification[1] are read from /loader/entries/\non the ESP and the Extended Boot Loader partition. Unified kernel boot entries following the\nBoot Loader Specification[1] are read from /EFI/Linux/ on the ESP and the Extended Boot\nLoader partition. Optionally, a random seed for early boot entropy pool provisioning is\nstored in /loader/random-seed in the ESP.\n",
                "subsections": []
            },
            "EFI VARIABLES": {
                "content": "The following EFI variables are defined, set and read by systemd-boot, under the vendor UUID\n\"4a67b082-0a4c-41cf-b6c7-440b29bb8c4f\", for communication between the OS and the boot loader:\n\nLoaderBootCountPath\nIf boot counting is enabled, contains the path to the file in whose name the boot\ncounters are encoded. Set by the boot loader.  systemd-bless-boot.service(8) uses this\ninformation to mark a boot as successful as determined by the successful activation of\nthe boot-complete.target target unit.\n\nLoaderConfigTimeout, LoaderConfigTimeoutOneShot\nThe menu timeout in seconds. Read by the boot loader.  LoaderConfigTimeout is maintained\npersistently, while LoaderConfigTimeoutOneShot is a one-time override which is read once\n(in which case it takes precedence over LoaderConfigTimeout) and then removed.\nLoaderConfigTimeout may be manipulated with the t/T keys, see above.\n\nLoaderDevicePartUUID\nContains the partition UUID of the EFI System Partition the boot loader was run from. Set\nby the boot loader.  systemd-gpt-auto-generator(8) uses this information to automatically\nfind the disk booted from, in order to discover various other partitions on the same disk\nautomatically.\n\nLoaderEntries\nA list of the identifiers of all discovered boot loader entries. Set by the boot loader.\n\nLoaderEntryDefault, LoaderEntryOneShot\nThe identifier of the default boot loader entry. Set primarily by the OS and read by the\nboot loader.  LoaderEntryOneShot sets the default entry for the next boot only, while\nLoaderEntryDefault sets it persistently for all future boots.  bootctl(1)'s set-default\nand set-oneshot commands make use of these variables. The boot loader modifies\nLoaderEntryDefault on request, when the d key is used, see above.\n\nLoaderEntrySelected\nThe identifier of the boot loader entry currently being booted. Set by the boot loader.\n\nLoaderFeatures\nA set of flags indicating the features the boot loader supports. Set by the boot loader.\nUse bootctl(1) to view this data.\n\nLoaderFirmwareInfo, LoaderFirmwareType\nBrief firmware information. Set by the boot loader. Use bootctl(1) to view this data.\n\nLoaderImageIdentifier\nThe path of executable of the boot loader used for the current boot, relative to the EFI\nSystem Partition's root directory. Set by the boot loader. Use bootctl(1) to view this\ndata.\n\nLoaderInfo\nBrief information about the boot loader. Set by the boot loader. Use bootctl(1) to view\nthis data.\n\nLoaderTimeExecUSec, LoaderTimeInitUSec, LoaderTimeMenuUsec\nInformation about the time spent in various parts of the boot loader. Set by the boot\nloader. Use systemd-analyze(1) to view this data.\n\nLoaderRandomSeed\nA binary random seed systemd-boot may optionally pass to the OS. This is a volatile EFI\nvariable that is hashed at boot from the combination of a random seed stored in the ESP\n(in /loader/random-seed) and a \"system token\" persistently stored in the EFI variable\nLoaderSystemToken (see below). During early OS boot the system manager reads this\nvariable and passes it to the OS kernel's random pool, crediting the full entropy it\ncontains. This is an efficient way to ensure the system starts up with a fully\ninitialized kernel random pool — as early as the initial RAM disk phase.  systemd-boot\nreads the random seed from the ESP, combines it with the \"system token\", and both derives\na new random seed to update in-place the seed stored in the ESP, and the random seed to\npass to the OS from it via SHA256 hashing in counter mode. This ensures that different\nphysical systems that boot the same \"golden\" OS image — i.e. containing the same random\nseed file in the ESP — will still pass a different random seed to the OS. It is made sure\nthe random seed stored in the ESP is fully overwritten before the OS is booted, to ensure\ndifferent random seed data is used between subsequent boots.\n\nSee Random Seeds[4] for further information.\n\nLoaderSystemToken\nA binary random data field, that is used for generating the random seed to pass to the OS\n(see above). Note that this random data is generally only generated once, during OS\ninstallation, and is then never updated again.\n\nMany of these variables are defined by the Boot Loader Interface[2].\n",
                "subsections": []
            },
            "BOOT COUNTING": {
                "content": "systemd-boot implements a simple boot counting mechanism on top of the Boot Loader\nSpecification[1], for automatic and unattended fallback to older kernel versions/boot loader\nentries when a specific entry continuously fails. Any boot loader entry file and unified\nkernel image file that contains a \"+\" followed by one or two numbers (if two they need to be\nseparated by a \"-\"), before the .conf or .efi suffix is subject to boot counting: the first\nof the two numbers ('tries left') is decreased by one on every boot attempt, the second of\nthe two numbers ('tries done') is increased by one (if 'tries done' is absent it is\nconsidered equivalent to 0). Depending on the current value of these two counters the boot\nentry is considered to be in one of three states:\n\n1. If the 'tries left' counter of an entry is greater than zero the entry is considered to\nbe in 'indeterminate' state. This means the entry has not completed booting successfully\nyet, but also hasn't been determined not to work.\n\n2. If the 'tries left' counter of an entry is zero it is considered to be in 'bad' state.\nThis means no further attempts to boot this item will be made (that is, unless all other\nboot entries are also in 'bad' state), as all attempts to boot this entry have not\ncompleted successfully.\n\n3. If the 'tries left' and 'tries done' counters of an entry are absent it is considered to\nbe in 'good' state. This means further boot counting for the entry is turned off, as it\nsuccessfully booted at least once. The systemd-bless-boot.service(8) service moves the\ncurrently booted entry from 'indeterminate' into 'good' state when a boot attempt\ncompleted successfully.\n\nGenerally, when new entries are added to the boot loader, they first start out in\n'indeterminate' state, i.e. with a 'tries left' counter greater than zero. The boot entry\nremains in this state until either it managed to complete a full boot successfully at least\nonce (in which case it will be in 'good' state) — or the 'tries left' counter reaches zero\n(in which case it will be in 'bad' state).\n\nExample: let's say a boot loader entry file foo.conf is set up for 3 boot tries. The\ninstaller will hence create it under the name foo+3.conf. On first boot, the boot loader will\nrename it to foo+2-1.conf. If that boot does not complete successfully, the boot loader will\nrename it to foo+1-2.conf on the following boot. If that fails too, it will finally be\nrenamed foo+0-3.conf by the boot loader on next boot, after which it will be considered\n'bad'. If the boot succeeds however the entry file will be renamed to foo.conf by the OS, so\nthat it is considered 'good' from then on.\n\nThe boot menu takes the 'tries left' counter into account when sorting the menu entries:\nentries in 'bad' state are ordered at the beginning of the list, and entries in 'good' or\n'indeterminate' at the end. The user can freely choose to boot any entry of the menu,\nincluding those already marked 'bad'. If the menu entry to boot is automatically determined,\nthis means that 'good' or 'indeterminate' entries are generally preferred (as the bottom item\nof the menu is the one booted by default), and 'bad' entries will only be considered if there\nare no 'good' or 'indeterminate' entries left.\n\nThe kernel-install(8) kernel install framework optionally sets the initial 'tries left'\ncounter to the value specified in /etc/kernel/tries when a boot loader entry is first\ncreated.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "bootctl(1), loader.conf(5), systemd-bless-boot.service(8), systemd-boot-system-\ntoken.service(8), kernel-install(8), Boot Loader Specification[1], Boot Loader Interface[2]\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. Boot Loader Specification\nhttps://systemd.io/BOOTLOADERSPECIFICATION\n\n2. Boot Loader Interface\nhttps://systemd.io/BOOTLOADERINTERFACE\n\n3. Automatic Boot Assessment\nhttps://systemd.io/AUTOMATICBOOTASSESSMENT\n\n4. Random Seeds\nhttps://systemd.io/RANDOMSEEDS\n\n\n\nsystemd 249                                                                          SYSTEMD-BOOT(7)",
                "subsections": []
            }
        }
    }
}