| 1 |
<?xml version="1.0"?> |
| 2 |
<!--*-nxml-*--> |
| 3 |
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" |
| 4 |
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ |
| 5 |
<!ENTITY % entities SYSTEM "custom-entities.ent" > |
| 6 |
%entities; |
| 7 |
]> |
| 8 |
<!-- SPDX-License-Identifier: LGPL-2.1-or-later --> |
| 9 |
<refentry id="systemd-debug-generator" xmlns:xi="http://www.w3.org/2001/XInclude"> |
| 10 |
|
| 11 |
<refentryinfo> |
| 12 |
<title>systemd-debug-generator</title> |
| 13 |
<productname>systemd</productname> |
| 14 |
</refentryinfo> |
| 15 |
|
| 16 |
<refmeta> |
| 17 |
<refentrytitle>systemd-debug-generator</refentrytitle> |
| 18 |
<manvolnum>8</manvolnum> |
| 19 |
</refmeta> |
| 20 |
|
| 21 |
<refnamediv> |
| 22 |
<refname>systemd-debug-generator</refname> |
| 23 |
<refpurpose>Generator for enabling a runtime debug shell and |
| 24 |
masking specific units at boot</refpurpose> |
| 25 |
</refnamediv> |
| 26 |
|
| 27 |
<refsynopsisdiv> |
| 28 |
<para><filename>/usr/lib/systemd/system-generators/systemd-debug-generator</filename></para> |
| 29 |
</refsynopsisdiv> |
| 30 |
|
| 31 |
<refsect1> |
| 32 |
<title>Description</title> |
| 33 |
|
| 34 |
<para><command>systemd-debug-generator</command> is a generator that provides some debugging |
| 35 |
functionality.</para> |
| 36 |
|
| 37 |
<para><command>systemd-debug-generator</command> implements |
| 38 |
<citerefentry><refentrytitle>systemd.generator</refentrytitle><manvolnum>7</manvolnum></citerefentry>.</para> |
| 39 |
</refsect1> |
| 40 |
|
| 41 |
<refsect1> |
| 42 |
<title>Kernel Command Line</title> |
| 43 |
|
| 44 |
<para><command>systemd-debug-generator</command> understands the following kernel command line |
| 45 |
parameters:</para> |
| 46 |
|
| 47 |
<variablelist class='kernel-commandline-options'> |
| 48 |
|
| 49 |
<varlistentry> |
| 50 |
<term><varname>systemd.mask=</varname></term> |
| 51 |
<term><varname>rd.systemd.mask=</varname></term> |
| 52 |
|
| 53 |
<listitem><para>These options take a unit name as argument. The unit specified is masked for the |
| 54 |
runtime (i.e. for this session — from boot to shutdown), similarly to the effect of |
| 55 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s |
| 56 |
<command>mask</command> command. This is useful to boot with certain units removed from the initial |
| 57 |
boot transaction for debugging system startup. May be specified more than once. The option prefixed |
| 58 |
with <literal>rd.</literal> is honored only in the initrd, while the one without prefix is only |
| 59 |
honored on the host.</para> |
| 60 |
|
| 61 |
<xi:include href="version-info.xml" xpointer="v215"/></listitem> |
| 62 |
</varlistentry> |
| 63 |
|
| 64 |
<varlistentry> |
| 65 |
<term><varname>systemd.wants=</varname></term> |
| 66 |
<term><varname>rd.systemd.wants=</varname></term> |
| 67 |
|
| 68 |
<listitem><para>These options take a unit name as argument. A start job for this unit is added to the |
| 69 |
initial transaction. This is useful to start one or more additional units at boot. May be specified |
| 70 |
more than once. The option prefixed with <literal>rd.</literal> is honored only in the initrd, while |
| 71 |
the one that is not prefixed only on the host.</para> |
| 72 |
|
| 73 |
<xi:include href="version-info.xml" xpointer="v215"/></listitem> |
| 74 |
</varlistentry> |
| 75 |
|
| 76 |
<varlistentry> |
| 77 |
<term><varname>systemd.debug_shell</varname></term> |
| 78 |
<term><varname>rd.systemd.debug_shell</varname></term> |
| 79 |
<term><varname>systemd.default_debug_tty=</varname></term> |
| 80 |
<term><varname>rd.systemd.default_debug_tty=</varname></term> |
| 81 |
|
| 82 |
<listitem><para>If the <option>systemd.debug_shell</option> or |
| 83 |
<option>rd.systemd.debug_shell</option> option is specified, the debug shell service |
| 84 |
<literal>debug-shell.service</literal> is pulled into the boot transaction and a debug shell will be |
| 85 |
spawned during early boot. By default, <filename>&DEBUGTTY;</filename> is used, but a specific tty |
| 86 |
can also be specified, either with or without the <filename>/dev/</filename> prefix. To set the tty |
| 87 |
to use without enabling the debug shell, the <option>systemd.default_debug_tty=</option> option can |
| 88 |
be used which also takes a tty with or without the <filename>/dev/</filename> prefix. Note that the |
| 89 |
shell may also be turned on persistently by enabling it with |
| 90 |
<citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>'s |
| 91 |
<command>enable</command> command. The options prefixed with <literal>rd.</literal> are honored only |
| 92 |
in the initrd, while the ones without prefix are only honored on the host.</para> |
| 93 |
|
| 94 |
<xi:include href="version-info.xml" xpointer="v215"/></listitem> |
| 95 |
</varlistentry> |
| 96 |
|
| 97 |
<varlistentry> |
| 98 |
<term><varname>systemd.break=</varname></term> |
| 99 |
<term><varname>rd.systemd.break=</varname></term> |
| 100 |
|
| 101 |
<listitem><para>Takes one of <option>pre-udev</option>, <option>pre-basic</option>, |
| 102 |
<option>pre-mount</option>, or <option>pre-switch-root</option> (the default for the |
| 103 |
<literal>rd.</literal> option). It also accepts multiple values separated by comma |
| 104 |
(<literal>,</literal>). These options allow one to pause the boot process at a certain point and spawn |
| 105 |
a debug shell. After exiting this shell, the system will resume booting. The option prefixed with |
| 106 |
<literal>rd.</literal> is honored only in the initrd, while the one without prefix is only honored on |
| 107 |
the host.</para> |
| 108 |
|
| 109 |
<table> |
| 110 |
<title>Available breakpoints</title> |
| 111 |
|
| 112 |
<tgroup cols='4'> |
| 113 |
<colspec colname='breakpoint' /> |
| 114 |
<colspec colname='description' /> |
| 115 |
<colspec colname='initrd' /> |
| 116 |
<colspec colname='host' /> |
| 117 |
<thead> |
| 118 |
<row> |
| 119 |
<entry>Breakpoints</entry> |
| 120 |
<entry>Description</entry> |
| 121 |
<entry>Can be used in the initrd</entry> |
| 122 |
<entry>Can be used on the host</entry> |
| 123 |
</row> |
| 124 |
</thead> |
| 125 |
<tbody> |
| 126 |
<row> |
| 127 |
<entry><option>pre-udev</option></entry> |
| 128 |
<entry>Before starting to process kernel uevents, i.e., before <filename>systemd-udevd.service</filename> starts.</entry> |
| 129 |
<entry>✓</entry> |
| 130 |
<entry>✓</entry> |
| 131 |
</row> |
| 132 |
<row> |
| 133 |
<entry><option>pre-basic</option></entry> |
| 134 |
<entry>Before leaving early boot and regular services start, i.e., before <filename>basic.target</filename> is reached.</entry> |
| 135 |
<entry>✓</entry> |
| 136 |
<entry>✓</entry> |
| 137 |
</row> |
| 138 |
<row> |
| 139 |
<entry><option>pre-mount</option></entry> |
| 140 |
<entry>Before the root filesystem is mounted, i.e., before <filename>sysroot.mount</filename> starts.</entry> |
| 141 |
<entry>✓</entry> |
| 142 |
<entry>✗</entry> |
| 143 |
</row> |
| 144 |
<row> |
| 145 |
<entry><option>pre-switch-root</option></entry> |
| 146 |
<entry>Before switching from the initrd to the real root.</entry> |
| 147 |
<entry>✓</entry> |
| 148 |
<entry>✗</entry> |
| 149 |
</row> |
| 150 |
</tbody> |
| 151 |
</tgroup> |
| 152 |
</table> |
| 153 |
|
| 154 |
<xi:include href="version-info.xml" xpointer="v258"/></listitem> |
| 155 |
</varlistentry> |
| 156 |
</variablelist> |
| 157 |
</refsect1> |
| 158 |
|
| 159 |
<refsect1> |
| 160 |
<title>System Credentials</title> |
| 161 |
|
| 162 |
<variablelist class='system-credentials'> |
| 163 |
<varlistentry> |
| 164 |
<term><varname>systemd.extra-unit.*</varname></term> |
| 165 |
|
| 166 |
<listitem><para>Credentials prefixed with <literal>systemd.extra-unit.</literal> specify additional |
| 167 |
units to add to the final system. Note that these additional units are added to both the initrd and |
| 168 |
the final system. <varname>ConditionPathExists=!/etc/initrd-release</varname> can be used to make |
| 169 |
sure the unit is conditioned out in the initrd. Note that this can also be used to mask units, by |
| 170 |
simply specifying an empty value.</para> |
| 171 |
|
| 172 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 173 |
</varlistentry> |
| 174 |
|
| 175 |
<varlistentry> |
| 176 |
<term><varname>systemd.unit-dropin.*</varname></term> |
| 177 |
|
| 178 |
<listitem><para>Credentials prefixed with <literal>systemd.unit-dropin.</literal> add drop-ins for |
| 179 |
the corresponding units in the final system. Each credential must be suffixed with the full unit name |
| 180 |
including the unit extension. Its contents must be a valid unit drop-in file. Optionally, the unit |
| 181 |
name may be followed with <literal>~</literal>, followed by the drop-in name without the |
| 182 |
<literal>.conf</literal> suffix. If not specified, the name of the generated drop-in will be |
| 183 |
<literal>50-credential.conf</literal>. Note that these additional drop-ins are added to both the |
| 184 |
initrd and the final system.</para> |
| 185 |
|
| 186 |
<xi:include href="version-info.xml" xpointer="v256"/></listitem> |
| 187 |
</varlistentry> |
| 188 |
</variablelist> |
| 189 |
</refsect1> |
| 190 |
|
| 191 |
<refsect1> |
| 192 |
<title>See Also</title> |
| 193 |
<para><simplelist type="inline"> |
| 194 |
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 195 |
<member><citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member> |
| 196 |
<member><citerefentry><refentrytitle>kernel-command-line</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 197 |
<member><citerefentry><refentrytitle>systemd.system-credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 198 |
<member><citerefentry><refentrytitle>bootup</refentrytitle><manvolnum>7</manvolnum></citerefentry></member> |
| 199 |
</simplelist></para> |
| 200 |
</refsect1> |
| 201 |
|
| 202 |
</refentry> |