source: chapter06/systemd.xml@ e88c73c

7.5-systemd 7.6-systemd 7.7-systemd 7.8-systemd 7.9-systemd
Last change on this file since e88c73c was e88c73c, checked in by Krejzi <krejzi@…>, 10 years ago

Merge latest lfs svn, update to D-Bus 1.8.0, fix Systemd to build with latest lfs changes.

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/systemd/BOOK@10454 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 22.6 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-system-systemd" role="wrap">
9 <?dbhtml filename="systemd.html"?>
10
11 <sect1info condition="script">
12 <productname>systemd</productname>
13 <productnumber>&systemd-version;</productnumber>
14 <address>&systemd-url;</address>
15 </sect1info>
16
17 <title>Systemd-&systemd-version;</title>
18
19 <indexterm zone="ch-system-systemd">
20 <primary sortas="a-Systemd">Systemd</primary>
21 </indexterm>
22
23 <sect2 role="package">
24 <title/>
25
26 <para>The Systemd package contains programs for controlling the startup,
27 running, and shutdown of the system.</para>
28
29 <segmentedlist>
30 <segtitle>&buildtime;</segtitle>
31 <segtitle>&diskspace;</segtitle>
32
33 <seglistitem>
34 <seg>&systemd-ch6-sbu;</seg>
35 <seg>&systemd-ch6-du;</seg>
36 </seglistitem>
37 </segmentedlist>
38 </sect2>
39
40 <sect2 role="installation">
41 <title>Installation of Systemd</title>
42
43 <para>First, create a file to allow Systemd to build when using Util-Linux
44 built in Chapter 5:</para>
45
46<screen><userinput remap="pre">cat &gt; config.cache &lt;&lt; "EOF"
47<literal>KILL=/bin/kill
48HAVE_BLKID=1
49BLKID_LIBS="-lblkid"
50BLKID_CFLAGS="-I/tools/include/blkid"</literal>
51EOF</userinput></screen>
52
53 <para>Aditionally, fix a build error when using Util-Linux built in
54 Chapter 5:</para>
55
56<screen><userinput remap="pre">sed -i "s:blkid/::" src/udev/udev-builtin-blkid.c</userinput></screen>
57
58 <para>Prepare Systemd for compilation:</para>
59
60<screen><userinput remap="configure">./configure --prefix=/usr \
61 --sysconfdir=/etc \
62 --localstatedir=/var \
63 --libexecdir=/usr/lib \
64 --docdir=/usr/share/doc/systemd-&systemd-version; \
65 --config-cache \
66 --with-rootprefix= \
67 --with-rootlibdir=/lib \
68 --enable-split-usr \
69 --disable-gudev \
70 --without-python</userinput></screen>
71
72 <variablelist>
73 <title>The meaning of the configure options:</title>
74
75 <varlistentry>
76 <term><parameter>--config-cache</parameter></term>
77 <listitem>
78 <para>This switch tells the build system to use
79 the <filename>config.cache</filename> file which
80 was created earlier.</para>
81 </listitem>
82 </varlistentry>
83
84 <varlistentry>
85 <term><parameter>--with-root*</parameter></term>
86 <listitem>
87 <para>These switches ensure that core programs and
88 shared libraries are installed in the subdirectories
89 of the root partition.</para>
90 </listitem>
91 </varlistentry>
92
93 <varlistentry>
94 <term><parameter>--enable-split-usr</parameter></term>
95 <listitem>
96 <para>This switch ensures that Systemd will work on
97 systems where /bin, /lib and /sbin directories are not
98 symlinks to their /usr counterparts.</para>
99 </listitem>
100 </varlistentry>
101
102 <varlistentry>
103 <term><parameter>--disable-gudev --without-python</parameter></term>
104 <listitem>
105 <para>These switches disable optional features because
106 LFS does not provide their dependencies.</para>
107 </listitem>
108 </varlistentry>
109
110 </variablelist>
111
112 <para>Compile the package:</para>
113
114<screen><userinput remap="make">make LIBRARY_PATH=/tools/lib</userinput></screen>
115
116 <para>The package comes with a testsuite, but it doesn't work in
117 chroot. It needs to be run from a system booted using Systemd.</para>
118
119 <para>Install the package:</para>
120
121<screen><userinput remap="install">make LD_LIBRARY_PATH=/tools/lib install</userinput></screen>
122
123 <para>Install manual pages which are shipped in the tarball, but were
124 not installed by install process:</para>
125
126<screen><userinput remap="install">for cat in 1 3 5 7 8
127do
128 install -v -m644 man/*.${cat} /usr/share/man/man${cat}
129done</userinput></screen>
130
131 <para>Move NSS myhostname library to <filename
132 class="directory">/lib</filename>:</para>
133
134<screen><userinput remap="install">mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
135
136 <para>Create the Sysvinit compatibility symlinks, so Systemd is used
137 as the default init system:</para>
138
139<screen><userinput remap="install">for tool in runlevel reboot shutdown poweroff halt telinit; do
140 ln -sfv ../bin/systemctl /sbin/${tool}
141done
142ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
143
144 <para>Remove a reference to a non-existent group:</para>
145
146<screen><userinput remap="install">sed -i "s@0775 root lock@0755 root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
147
148 <para>Create the <filename>/etc/machine-id</filename> file needed by
149 Journald:</para>
150
151<screen><userinput remap="install">systemd-machine-id-setup</userinput></screen>
152
153 </sect2>
154
155 <sect2 id="contents-systemd" role="content">
156 <title>Contents of Systemd</title>
157
158 <segmentedlist>
159 <segtitle>Installed programs</segtitle>
160 <segtitle>Installed libraries</segtitle>
161 <segtitle>Installed directories</segtitle>
162
163 <seglistitem>
164 <seg>bootctl, halt, hostnamectl, init, journalctl, kernel-install, localectl,
165 loginctl, machinectl, poweroff, reboot, runlevel, shutdown, systemctl,
166 systemd-analyze, systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop,
167 systemd-coredumpctl, systemd-delta, systemd-detect-virt, systemd-inhibit,
168 systemd-machine-id-setup, systemd-notify, systemd-nspawn, systemd-run,
169 systemd-stdio-bridge, systemd-tmpfiles, systemd-tty-ask-password-agent, telinit,
170 timedatectl, and udevadm</seg>
171 <seg>libnss_myhostname.so.2, libsystemd-daemon.so, libsystemd-id128.so,
172 libsystemd-journal.so, libsystemd-login.so, libudev.so</seg>
173 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
174 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
175 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
176 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d, /usr/lib/rpm,
177 /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d,
178 /usr/share/doc/systemd-&systemd-version;, /usr/share/systemd,
179 /var/lib/systemd, /var/log/journal</seg>
180 </seglistitem>
181 </segmentedlist>
182
183 <variablelist>
184 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
185 <?dbfo list-presentation="list"?>
186 <?dbhtml list-presentation="table"?>
187
188<!-- <varlistentry id="bootctl">
189 <term><command>bootctl</command></term>
190 <listitem>
191 <para></para>
192 <indexterm zone="ch-system-systemd bootctl">
193 <primary sortas="b-bootctl">bootctl</primary>
194 </indexterm>
195 </listitem>
196 </varlistentry> -->
197
198 <varlistentry id="halt">
199 <term><command>halt</command></term>
200 <listitem>
201 <para>Normally invokes <command>shutdown</command> with the
202 <parameter>-h</parameter> option, except when already in run-level 0,
203 then it tells the kernel to halt the system; it notes in the
204 file <filename>/var/log/wtmp</filename> that the system is being
205 brought down.</para>
206 <indexterm zone="ch-system-systemd halt">
207 <primary sortas="b-halt">halt</primary>
208 </indexterm>
209 </listitem>
210 </varlistentry>
211
212 <varlistentry id="hostnamectl">
213 <term><command>hostnamectl</command></term>
214 <listitem>
215 <para>used to query and change the system hostname and related
216 settings.</para>
217 <indexterm zone="ch-system-systemd hostnamectl">
218 <primary sortas="b-hostnamectl">hostnamectl</primary>
219 </indexterm>
220 </listitem>
221 </varlistentry>
222
223 <varlistentry id="init">
224 <term><command>init</command></term>
225 <listitem>
226 <para>The first process to be started when the kernel has initialized
227 the hardware which takes over the boot process and starts all the
228 proceses it is instructed to.</para>
229 <indexterm zone="ch-system-systemd init">
230 <primary sortas="b-init">init</primary>
231 </indexterm>
232 </listitem>
233 </varlistentry>
234
235 <varlistentry id="journalctl">
236 <term><command>journalctl</command></term>
237 <listitem>
238 <para>used to query the contents of the Systemd Journal.</para>
239 <indexterm zone="ch-system-systemd journalctl">
240 <primary sortas="b-journalctl">journalctl</primary>
241 </indexterm>
242 </listitem>
243 </varlistentry>
244
245 <varlistentry id="kernel-install">
246 <term><command>kernel-install</command></term>
247 <listitem>
248 <para>used to add and remove kernel and initramfs images to and
249 from /boot.</para>
250 <indexterm zone="ch-system-systemd kernel-install">
251 <primary sortas="b-kernel-install">kernel-install</primary>
252 </indexterm>
253 </listitem>
254 </varlistentry>
255
256 <varlistentry id="localectl">
257 <term><command>localectl</command></term>
258 <listitem>
259 <para>used to query and change the system locale and keyboard layout
260 settings.</para>
261 <indexterm zone="ch-system-systemd localectl">
262 <primary sortas="b-localectl">localectl</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
267 <varlistentry id="loginctl">
268 <term><command>loginctl</command></term>
269 <listitem>
270 <para>used to introspect and control the state of the Systemd Login
271 Manager.</para>
272 <indexterm zone="ch-system-systemd loginctl">
273 <primary sortas="b-loginctl">loginctl</primary>
274 </indexterm>
275 </listitem>
276 </varlistentry>
277
278 <varlistentry id="machinectl">
279 <term><command>machinectl</command></term>
280 <listitem>
281 <para>used to introspect and control the state of the Systemd Virtual
282 Machine and Container Registration Manager</para>
283 <indexterm zone="ch-system-systemd machinectl">
284 <primary sortas="b-machinectl">machinectl</primary>
285 </indexterm>
286 </listitem>
287 </varlistentry>
288
289 <varlistentry id="poweroff">
290 <term><command>poweroff</command></term>
291 <listitem>
292 <para>Tells the kernel to halt the system and switch off the computer
293 (see <command>halt</command>).</para>
294 <indexterm zone="ch-system-systemd poweroff">
295 <primary sortas="b-poweroff">poweroff</primary>
296 </indexterm>
297 </listitem>
298 </varlistentry>
299
300 <varlistentry id="reboot">
301 <term><command>reboot</command></term>
302 <listitem>
303 <para>Tells the kernel to reboot the system (see
304 <command>halt</command>).</para>
305 <indexterm zone="ch-system-systemd reboot">
306 <primary sortas="b-reboot">reboot</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="runlevel">
312 <term><command>runlevel</command></term>
313 <listitem>
314 <para>Reports the previous and the current run-level, as noted in the
315 last run-level record in <filename>/var/run/utmp</filename>.</para>
316 <indexterm zone="ch-system-systemd runlevel">
317 <primary sortas="b-runlevel">runlevel</primary>
318 </indexterm>
319 </listitem>
320 </varlistentry>
321
322 <varlistentry id="shutdown">
323 <term><command>shutdown</command></term>
324 <listitem>
325 <para>Brings the system down in a secure way, signaling all processes
326 and notifying all logged-in users.</para>
327 <indexterm zone="ch-system-systemd shutdown">
328 <primary sortas="b-shutdown">shutdown</primary>
329 </indexterm>
330 </listitem>
331 </varlistentry>
332
333 <varlistentry id="systemctl">
334 <term><command>systemctl</command></term>
335 <listitem>
336 <para>used to introspect and control the state of the Systemd system and
337 service manager.</para>
338 <indexterm zone="ch-system-systemd systemctl">
339 <primary sortas="b-systemctl">systemctl</primary>
340 </indexterm>
341 </listitem>
342 </varlistentry>
343
344 <varlistentry id="systemd-analyze">
345 <term><command>systemd-analyze</command></term>
346 <listitem>
347 <para>used to determine system boot-up performance of the current boot.
348 </para>
349 <indexterm zone="ch-system-systemd systemd-analyze">
350 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
351 </indexterm>
352 </listitem>
353 </varlistentry>
354
355 <varlistentry id="systemd-ask-password">
356 <term><command>systemd-ask-password</command></term>
357 <listitem>
358 <para>used to query a system password or passphrase from the user, using a
359 question message specified on the command line.</para>
360 <indexterm zone="ch-system-systemd systemd-ask-password">
361 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
362 </indexterm>
363 </listitem>
364 </varlistentry>
365
366 <varlistentry id="systemd-cat">
367 <term><command>systemd-cat</command></term>
368 <listitem>
369 <para>used to connect STDOUT and STDERR of a process with the Journal.
370 </para>
371 <indexterm zone="ch-system-systemd systemd-cat">
372 <primary sortas="b-systemd-cat">systemd-cat</primary>
373 </indexterm>
374 </listitem>
375 </varlistentry>
376
377 <varlistentry id="systemd-cgls">
378 <term><command>systemd-cgls</command></term>
379 <listitem>
380 <para>recursively shows the contents of the selected Linux control group
381 hierarchy in a tree.</para>
382 <indexterm zone="ch-system-systemd systemd-cgls">
383 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
384 </indexterm>
385 </listitem>
386 </varlistentry>
387
388 <varlistentry id="systemd-cgtop">
389 <term><command>systemd-cgtop</command></term>
390 <listitem>
391 <para>shows the top control groups of the local Linux control group hierarchy,
392 ordered by their CPU, memory and disk I/O load.</para>
393 <indexterm zone="ch-system-systemd systemd-cgtop">
394 <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
395 </indexterm>
396 </listitem>
397 </varlistentry>
398
399 <varlistentry id="systemd-coredumpctl">
400 <term><command>systemd-coredumpctl</command></term>
401 <listitem>
402 <para>used to retrieve coredumps from the Systemd Journal</para>
403 <indexterm zone="ch-system-systemd systemd-coredumpctl">
404 <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
405 </indexterm>
406 </listitem>
407 </varlistentry>
408
409 <varlistentry id="systemd-delta">
410 <term><command>systemd-delta</command></term>
411 <listitem>
412 <para>used to identify and compare configuration files in
413 <filename class="directory">/etc</filename> that override default
414 counterparts in <filename class="directory">/usr</filename>.</para>
415 <indexterm zone="ch-system-systemd systemd-delta">
416 <primary sortas="b-systemd-delta">systemd-delta</primary>
417 </indexterm>
418 </listitem>
419 </varlistentry>
420
421 <varlistentry id="systemd-detect-virt">
422 <term><command>systemd-detect-virt</command></term>
423 <listitem>
424 <para>detects execution in a virtualized environment.</para>
425 <indexterm zone="ch-system-systemd systemd-detect-virt">
426 <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
427 </indexterm>
428 </listitem>
429 </varlistentry>
430
431 <varlistentry id="systemd-inhibit">
432 <term><command>systemd-inhibit</command></term>
433 <listitem>
434 <para>used to execute a program with a shutdown, sleep or idle inhibitor lock
435 taken.</para>
436 <indexterm zone="ch-system-systemd systemd-inhibit">
437 <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="systemd-machine-id-setup">
443 <term><command>systemd-machine-id-setup</command></term>
444 <listitem>
445 <para>used by system installer tools to initialize the machine ID stored in
446 <filename>/etc/machine-id</filename> at install time with a randomly
447 generated ID.</para>
448 <indexterm zone="ch-system-systemd systemd-machine-id-setup">
449 <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
450 </indexterm>
451 </listitem>
452 </varlistentry>
453
454 <varlistentry id="systemd-notify">
455 <term><command>systemd-notify</command></term>
456 <listitem>
457 <para>used by daemon scripts to notify the init system about status changes.
458 </para>
459 <indexterm zone="ch-system-systemd systemd-notify">
460 <primary sortas="b-systemd-notify">systemd-notify</primary>
461 </indexterm>
462 </listitem>
463 </varlistentry>
464
465 <varlistentry id="systemd-nspawn">
466 <term><command>systemd-nspawn</command></term>
467 <listitem>
468 <para>used to run a command or OS in a light-weight namespace container.</para>
469 <indexterm zone="ch-system-systemd systemd-nspawn">
470 <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
471 </indexterm>
472 </listitem>
473 </varlistentry>
474
475 <varlistentry id="systemd-run">
476 <term><command>systemd-run</command></term>
477 <listitem>
478 <para>used to create and start a transient .service or a .scope unit and
479 run the specified command in it.</para>
480 <indexterm zone="ch-system-systemd systemd-run">
481 <primary sortas="b-systemd-run">systemd-run</primary>
482 </indexterm>
483 </listitem>
484 </varlistentry>
485
486<!-- <varlistentry id="systemd-stdio-bridge">
487 <term><command>systemd-stdio-bridge</command></term>
488 <listitem>
489 <para>To be completed</para>
490 <indexterm zone="ch-system-systemd systemd-stdio-bridge">
491 <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
492 </indexterm>
493 </listitem>
494 </varlistentry> -->
495
496 <varlistentry id="systemd-tmpfiles">
497 <term><command>systemd-tmpfiles</command></term>
498 <listitem>
499 <para>creates, deletes and cleans up volatile and temporary files and directories,
500 based on the configuration file format and location specified in
501 <filename class="directory">tmpfiles.d</filename> directories.</para>
502 <indexterm zone="ch-system-systemd systemd-tmpfiles">
503 <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
504 </indexterm>
505 </listitem>
506 </varlistentry>
507
508 <varlistentry id="systemd-tty-ask-password-agent">
509 <term><command>systemd-tty-ask-password-agent</command></term>
510 <listitem>
511 <para>used to list or process pending Systemd password requests</para>
512 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
513 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
514 </indexterm>
515 </listitem>
516 </varlistentry>
517
518 <varlistentry id="telinit">
519 <term><command>telinit</command></term>
520 <listitem>
521 <para>Tells <command>init</command> which run-level to change to.</para>
522 <indexterm zone="ch-system-systemd telinit">
523 <primary sortas="b-telinit">telinit</primary>
524 </indexterm>
525 </listitem>
526 </varlistentry>
527
528 <varlistentry id="timedatectl">
529 <term><command>timedatectl</command></term>
530 <listitem>
531 <para>used to query and change the system clock and its settings.
532 </para>
533 <indexterm zone="ch-system-systemd timedatectl">
534 <primary sortas="b-timedatectl">timedatectl</primary>
535 </indexterm>
536 </listitem>
537 </varlistentry>
538
539 <varlistentry id="udevadm">
540 <term><command>udevadm</command></term>
541 <listitem>
542 <para>Generic Udev administration tool: controls the udevd daemon,
543 provides info from the Udev database, monitors uevents, waits for
544 uevents to finish, tests Udev configuration, and triggers uevents
545 for a given device.</para>
546 <indexterm zone="ch-system-systemd udevadm">
547 <primary sortas="b-udevadm">udevadm</primary>
548 </indexterm>
549 </listitem>
550 </varlistentry>
551
552 <varlistentry id="libsystemd-daemon">
553 <term><filename class="libraryfile">libsystemd-daemon</filename></term>
554 <listitem>
555 <para>Systemd Daemon utility library.</para>
556 <indexterm zone="ch-system-systemd libsystemd-daemon">
557 <primary sortas="c-libsystemd-daemon">libsystemd-daemon</primary>
558 </indexterm>
559 </listitem>
560 </varlistentry>
561
562 <varlistentry id="libsystemd-id128">
563 <term><filename class="libraryfile">libsystemd-id128</filename></term>
564 <listitem>
565 <para>Systemd 128 Bit ID utility library.</para>
566 <indexterm zone="ch-system-systemd libsystemd-id128">
567 <primary sortas="c-libsystemd-id128">libsystemd-id128</primary>
568 </indexterm>
569 </listitem>
570 </varlistentry>
571
572 <varlistentry id="libsystemd-journal">
573 <term><filename class="libraryfile">libsystemd-journal</filename></term>
574 <listitem>
575 <para>Systemd Journal utility library.</para>
576 <indexterm zone="ch-system-systemd libsystemd-journal">
577 <primary sortas="c-libsystemd-journal">libsystemd-journal</primary>
578 </indexterm>
579 </listitem>
580 </varlistentry>
581
582 <varlistentry id="libsystemd-login">
583 <term><filename class="libraryfile">libsystemd-login</filename></term>
584 <listitem>
585 <para>Systemd Login utility library.</para>
586 <indexterm zone="ch-system-systemd libsystemd-login">
587 <primary sortas="c-libsystemd-login">libsystemd-login</primary>
588 </indexterm>
589 </listitem>
590 </varlistentry>
591
592 <varlistentry id="libudev">
593 <term><filename class="libraryfile">libudev</filename></term>
594 <listitem>
595 <para>A library to access Udev device information.</para>
596 <indexterm zone="ch-system-systemd libudev">
597 <primary sortas="c-libudev">libudev</primary>
598 </indexterm>
599 </listitem>
600 </varlistentry>
601
602 </variablelist>
603
604 </sect2>
605
606</sect1>
Note: See TracBrowser for help on using the repository browser.