]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/bootctl.xml
virt: detect WSL environment as a container (id: wsl)
[thirdparty/systemd.git] / man / bootctl.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="bootctl" conditional='ENABLE_EFI'
10 xmlns:xi="http://www.w3.org/2001/XInclude">
11 <refentryinfo>
12 <title>bootctl</title>
13 <productname>systemd</productname>
14 </refentryinfo>
15
16 <refmeta>
17 <refentrytitle>bootctl</refentrytitle>
18 <manvolnum>1</manvolnum>
19 </refmeta>
20
21 <refnamediv>
22 <refname>bootctl</refname>
23 <refpurpose>Control the firmware and boot manager settings</refpurpose>
24 </refnamediv>
25
26 <refsynopsisdiv>
27 <cmdsynopsis>
28 <command>bootctl</command>
29 <arg choice="opt" rep="repeat">OPTIONS</arg>
30 <arg choice="req">COMMAND</arg>
31 </cmdsynopsis>
32 </refsynopsisdiv>
33
34 <refsect1>
35 <title>Description</title>
36
37 <para><command>bootctl</command> can check the EFI boot loader status, list available boot loaders and boot loader
38 entries, and install, update, or remove the
39 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry> boot loader on the
40 current system.</para>
41 </refsect1>
42
43 <refsect1>
44 <title>Options</title>
45 <para>The following options are understood:</para>
46
47 <variablelist>
48 <varlistentry>
49 <term><option>--esp-path=</option></term>
50 <listitem><para>Path to the EFI System Partition (ESP). If not specified, <filename>/efi/</filename>,
51 <filename>/boot/</filename>, and <filename>/boot/efi</filename> are checked in turn. It is recommended to mount
52 the ESP to <filename>/efi/</filename>, if possible.</para></listitem>
53 </varlistentry>
54
55 <varlistentry>
56 <term><option>--boot-path=</option></term>
57 <listitem><para>Path to the Extended Boot Loader partition, as defined in the <ulink
58 url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink>. If not
59 specified, <filename>/boot/</filename> are checked. It is recommended to mount the Extended Boot
60 Loader partition to <filename>/boot/</filename>, if possible.</para></listitem>
61 </varlistentry>
62
63 <varlistentry>
64 <term><option>-p</option></term>
65 <term><option>--print-esp-path</option></term>
66 <listitem><para>This option modifies the behaviour of <command>status</command>. Prints only the
67 path to the EFI System Partition (ESP) to standard output and exits.</para></listitem>
68 </varlistentry>
69
70 <varlistentry>
71 <term><option>--print-boot-path</option></term>
72 <listitem><para>This option modifies the behaviour of <command>status</command>. Prints only the
73 path to the Extended Boot Loader partition if it exists, and the path to the ESP otherwise to
74 standard output and exit. This command is useful to determine where to place boot loader entries, as
75 they are preferably placed in the Extended Boot Loader partition if it exists and in the ESP
76 otherwise.</para></listitem>
77 </varlistentry>
78
79 <varlistentry>
80 <term><option>--no-variables</option></term>
81 <listitem><para>Do not touch the firmware's boot loader list stored in EFI variables.</para></listitem>
82 </varlistentry>
83
84 <xi:include href="standard-options.xml" xpointer="no-pager"/>
85 <xi:include href="standard-options.xml" xpointer="help"/>
86 <xi:include href="standard-options.xml" xpointer="version"/>
87 </variablelist>
88 </refsect1>
89
90 <refsect1>
91 <title>Commands</title>
92 <variablelist>
93
94 <varlistentry>
95 <term><option>status</option></term>
96
97 <listitem><para>Shows brief information about the system firmware, the boot loader that was used to boot the
98 system, the boot loaders currently available in the ESP, the boot loaders listed in the firmware's list of boot
99 loaders and the current default boot loader entry. If no command is specified, this is the implied
100 default.</para></listitem>
101 </varlistentry>
102
103 <varlistentry>
104 <term><option>install</option></term>
105
106 <listitem><para>Installs <command>systemd-boot</command> into the EFI system partition. A copy of
107 <command>systemd-boot</command> will be stored as the EFI default/fallback loader at
108 <filename><replaceable>ESP</replaceable>/EFI/BOOT/BOOT*.EFI</filename>. The boot loader is then added
109 to the top of the firmware's boot loader list.</para></listitem>
110 </varlistentry>
111
112 <varlistentry>
113 <term><option>update</option></term>
114
115 <listitem><para>Updates all installed versions of
116 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>, if the
117 available version is newer than the version installed in the EFI system partition. This also includes the EFI
118 default/fallback loader at <filename><replaceable>ESP</replaceable>/EFI/BOOT/BOOT*.EFI</filename>. The boot
119 loader is then added to end of the firmware's boot loader list if missing.</para></listitem>
120 </varlistentry>
121
122 <varlistentry>
123 <term><option>remove</option></term>
124
125 <listitem><para>Removes all installed versions of <command>systemd-boot</command> from the EFI system partition
126 and the firmware's boot loader list.</para></listitem>
127 </varlistentry>
128
129 <varlistentry>
130 <term><option>list</option></term>
131
132 <listitem><para>Shows all available boot loader entries implementing the <ulink
133 url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader
134 Specification</ulink>, as well as any other entries discovered or automatically generated by the boot
135 loader.</para></listitem>
136 </varlistentry>
137
138 <varlistentry>
139 <term><option>set-default</option> <replaceable>ID</replaceable></term>
140 <term><option>set-oneshot</option> <replaceable>ID</replaceable></term>
141
142 <listitem><para>Sets the default boot loader entry. Takes a single boot loader entry ID string as argument. The
143 <option>set-oneshot</option> command will set the default entry only for the next boot, the
144 <option>set-default</option> will set it persistently for all future boots.</para></listitem>
145 </varlistentry>
146
147 </variablelist>
148 </refsect1>
149
150 <refsect1>
151 <title>Exit status</title>
152 <para>On success, 0 is returned, a non-zero failure code otherwise.</para>
153 </refsect1>
154
155 <refsect1>
156 <title>Environment</title>
157 <para>If <varname>$SYSTEMD_RELAX_ESP_CHECKS=1</varname> is set the validation checks for the ESP are
158 relaxed, and the path specified with <option>--esp-path=</option> may refer to any kind of file system on
159 any kind of partition.</para>
160
161 <para>Similarly, <varname>$SYSTEMD_RELAX_XBOOTLDR_CHECKS=1</varname> turns off some validation checks for
162 the Extended Boot Loader partition.</para>
163 </refsect1>
164
165 <refsect1>
166 <title>See Also</title>
167 <para>
168 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
169 <ulink url="https://systemd.io/BOOT_LOADER_SPECIFICATION">Boot Loader Specification</ulink>,
170 <ulink url="https://systemd.io/BOOT_LOADER_INTERFACE">Boot Loader Interface</ulink>
171 </para>
172 </refsect1>
173 </refentry>