]>
Commit | Line | Data |
---|---|---|
ab3fc7b1 | 1 | <?xml version='1.0'?> <!--*-nxml-*--> |
3a54a157 | 2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
ab3fc7b1 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
0307f791 | 4 | <!-- SPDX-License-Identifier: LGPL-2.1+ --> |
ab3fc7b1 LP |
5 | |
6 | <refentry id="systemd-bless-boot.service" conditional='ENABLE_EFI' | |
7 | xmlns:xi="http://www.w3.org/2001/XInclude"> | |
8 | ||
9 | <refentryinfo> | |
10 | <title>systemd-bless-boot.service</title> | |
11 | <productname>systemd</productname> | |
12 | </refentryinfo> | |
13 | ||
14 | <refmeta> | |
15 | <refentrytitle>systemd-bless-boot.service</refentrytitle> | |
16 | <manvolnum>8</manvolnum> | |
17 | </refmeta> | |
18 | ||
19 | <refnamediv> | |
20 | <refname>systemd-bless-boot.service</refname> | |
21 | <refpurpose>Mark current boot process as successful</refpurpose> | |
22 | </refnamediv> | |
23 | ||
24 | <refsynopsisdiv> | |
25 | <para><filename>systemd-bless-boot.service</filename></para> | |
26 | <para><filename>/usr/lib/systemd/system-bless-boot</filename></para> | |
27 | </refsynopsisdiv> | |
28 | ||
29 | <refsect1> | |
30 | <title>Description</title> | |
31 | ||
32 | <para><filename>systemd-bless-boot.service</filename> is a system service that marks the current boot process as | |
33 | successful. It's automatically pulled into the initial transaction when | |
34 | <citerefentry><refentrytitle>systemd-bless-boot-generator</refentrytitle><manvolnum>8</manvolnum></citerefentry> | |
35 | detects that <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry> style | |
36 | boot counting is used.</para> | |
37 | ||
38 | <para>Internally, the service operates based on the <varname>LoaderBootCountPath</varname> EFI variable (of the | |
39 | vendor UUID <constant>4a67b082-0a4c-41cf-b6c7-440b29bb8c4</constant>), which is passed from the boot loader to the | |
40 | OS. It contains a file system path (relative to the EFI system partition) of the <ulink | |
41 | url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink> compliant boot loader entry | |
42 | file or unified kernel image file that was used to boot up the | |
43 | system. <command>systemd-bless-boot.service</command> removes the two 'tries done' and 'tries left' numeric boot | |
44 | counters from the filename, which indicates to future invocations of the boot loader that the entry has completed | |
45 | booting successfully at least once. (This service will hence rename the boot loader entry file or unified kernel | |
46 | image file on the first successful boot.)</para> | |
47 | </refsect1> | |
48 | ||
49 | <refsect1> | |
50 | <title>Options</title> | |
51 | ||
52 | <para>The <filename>/usr/lib/systemd/system-bless-boot</filename> executable may also be invoked from the | |
53 | command line, taking one of the following command arguments:</para> | |
54 | ||
55 | <variablelist> | |
56 | <varlistentry> | |
57 | <term><option>status</option></term> | |
58 | ||
59 | <listitem><para>The current status of the boot loader entry file or unified kernel image file is shown. This | |
60 | outputs one of <literal>good</literal>, <literal>bad</literal>, <literal>indeterminate</literal>, | |
61 | <literal>clean</literal>, depending on the state and previous invocations of the command. The string | |
62 | <literal>indeterminate</literal> is shown initially after boot, before it has been marked as "good" or | |
63 | "bad". The string <literal>good</literal> is shown after the boot was marked as "good" with the | |
64 | <option>good</option> command below, and "bad" conversely after the <option>bad</option> command was | |
65 | invoked. The string <literal>clean</literal> is returned when boot counting is currently not in effect.</para> | |
66 | ||
67 | <para>This command is implied if no command argument is specified.</para></listitem> | |
68 | </varlistentry> | |
69 | ||
70 | <varlistentry> | |
71 | <term><option>good</option></term> | |
72 | ||
73 | <listitem><para>When invoked, the current boot loader entry file or unified kernel image file will be marked as | |
74 | "good", executing the file rename operation described above. This command is intended to be invoked at the end | |
75 | of a successful boot. The <filename>systemd-bless-boot.service</filename> unit invokes this | |
76 | command.</para></listitem> | |
77 | </varlistentry> | |
78 | ||
79 | <varlistentry> | |
80 | <term><option>bad</option></term> | |
81 | ||
82 | <listitem><para>When called the 'tries left' counter in the boot loader entry file name or unified kernel image | |
83 | file name is set to zero, marking the boot loader entry or kernel image as "bad", so that the boot loader won't | |
84 | consider it anymore on future boots (at least as long as there are other entries available that are not marked | |
85 | "bad" yet). This command is normally not executed, but can be used to instantly put an end to the boot counting | |
86 | logic if a problem is detected and persistently mark the boot entry as bad.</para></listitem> | |
87 | </varlistentry> | |
88 | ||
89 | <varlistentry> | |
90 | <term><option>indeterminate</option></term> | |
91 | ||
92 | <listitem><para>This command undoes any marking of the current boot loader entry file or unified kernel image | |
93 | file as good or bad. This is implemented by renaming the boot loader entry file or unified kernel image file | |
94 | back to the path encoded in the <varname>LoaderBootCountPath</varname> EFI variable.</para></listitem> | |
95 | </varlistentry> | |
96 | ||
97 | <xi:include href="standard-options.xml" xpointer="help" /> | |
98 | <xi:include href="standard-options.xml" xpointer="version" /> | |
99 | ||
100 | </variablelist> | |
101 | </refsect1> | |
102 | ||
103 | <refsect1> | |
104 | <title>See Also</title> | |
105 | <para> | |
106 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
107 | <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>, | |
108 | <citerefentry><refentrytitle>systemd.special</refentrytitle><manvolnum>1</manvolnum></citerefentry> | |
109 | </para> | |
110 | </refsect1> | |
111 | ||
112 | </refentry> |