]> git.proxmox.com Git - systemd.git/blame - man/systemd-kexec.service.html
Imported Upstream version 219
[systemd.git] / man / systemd-kexec.service.html
CommitLineData
663996b3
MS
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd-halt.service</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
2 a.headerlink {
3 color: #c60f0f;
4 font-size: 0.8em;
5 padding: 0 4px 0 4px;
6 text-decoration: none;
7 visibility: hidden;
8 }
9
10 a.headerlink:hover {
11 background-color: #c60f0f;
12 color: white;
13 }
14
15 h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
16 visibility: visible;
17 }
18 </style><a href="index.html">Index </a>·
19 <a href="systemd.directives.html">Directives </a>·
20 <a href="../python-systemd/index.html">Python </a>·
21 <a href="../libudev/index.html">libudev </a>·
e735f4d4
MP
22 <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 219</span><hr><div class="refentry"><a name="systemd-halt.service"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd-halt.service, systemd-poweroff.service, systemd-reboot.service, systemd-kexec.service, systemd-shutdown — System shutdown logic</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename">systemd-halt.service</code></p><p><code class="filename">systemd-poweroff.service</code></p><p><code class="filename">systemd-reboot.service</code></p><p><code class="filename">systemd-kexec.service</code></p><p><code class="filename">/usr/lib/systemd/systemd-shutdown</code></p></div><div class="refsect1"><a name="idm140022452053280"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p><code class="filename">systemd-halt.service</code> is a system
23 service that is pulled in by <code class="filename">halt.target</code> and
24 is responsible for the actual system halt. Similarly,
25 <code class="filename">systemd-poweroff.service</code> is pulled in by
26 <code class="filename">poweroff.target</code>,
27 <code class="filename">systemd-reboot.service</code> by
28 <code class="filename">reboot.target</code> and
29 <code class="filename">systemd-kexec.service</code> by
30 <code class="filename">kexec.target</code> to execute the respective
31 actions.</p><p>When these services are run, they ensure that PID 1 is
32 replaced by the
33 <code class="filename">/usr/lib/systemd/systemd-shutdown</code> tool which
34 is then responsible for the actual shutdown. Before shutting down,
35 this binary will try to unmount all remaining file systems,
36 disable all remaining swap devices, detach all remaining storage
37 devices and kill all remaining processes.</p><p>It is necessary to have this code in a separate binary
38 because otherwise rebooting after an upgrade might be broken — the
39 running PID 1 could still depend on libraries which are not
40 available any more, thus keeping the file system busy, which then
41 cannot be re-mounted read-only.</p><p>Immediately before executing the actual system
42 halt/poweroff/reboot/kexec <code class="filename">systemd-shutdown</code>
43 will run all executables in
44 <code class="filename">/usr/lib/systemd/system-shutdown/</code> and pass
45 one arguments to them: either "<code class="literal">halt</code>",
46 "<code class="literal">poweroff</code>", "<code class="literal">reboot</code>" or
47 "<code class="literal">kexec</code>", depending on the chosen action. All
48 executables in this directory are executed in parallel, and
49 execution of the action is not continued before all executables
50 finished.</p><p>Note that <code class="filename">systemd-halt.service</code> (and the
51 related units) should never be executed directly. Instead, trigger
52 system shutdown with a command such as "<code class="literal">systemctl
53 halt</code>" or suchlike.</p></div><div class="refsect1"><a name="idm140022455939872"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
54 <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
55 <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(1)</span></a>,
56 <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>,
57 <a href="http://man7.org/linux/man-pages/man2/reboot.2.html"><span class="citerefentry"><span class="refentrytitle">reboot</span>(2)</span></a>,
58 <a href="systemd-suspend.service.html"><span class="citerefentry"><span class="refentrytitle">systemd-suspend.service</span>(8)</span></a>
59 </p></div></div></body></html>