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