source: BOOK/final-system/common/systemd.xml@ e8cb61f

clfs-3.0.0-systemd systemd
Last change on this file since e8cb61f was edbe771, checked in by Chris Staub <chris@…>, 11 years ago

Text fix

  • Property mode set to 100644
File size: 22.8 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<sect1 id="ch-system-systemd" role="wrap">
8 <?dbhtml filename="systemd.html"?>
9
10 <title>Systemd-&systemd-version;</title>
11
12 <indexterm zone="ch-system-systemd">
13 <primary sortas="a-systemd">Systemd</primary>
14 </indexterm>
15
16 <sect2 role="package">
17 <title/>
18
19 <para>The systemd package is a system and service manager for Linux
20 operating systems.</para>
21
22 </sect2>
23
24 <sect2 role="installation">
25 <title>Installation of Systemd</title>
26
27 <para os="p1">Systemd 209 merged several libraries into
28 <filename class="libraryfile">libsystemd</filename>, but some packages
29 that use systemd still expect those separate libraries. Apply a patch
30 to allow backwards compatibility with these packages by
31 installing Pkg-config files for the old libraries:</para>
32
33<screen os="p2"><userinput>patch -Np1 -i ../&systemd-compat-patch;</userinput></screen>
34
35 <para os="s1">Prevent the <filename>Makefile</filename> from trying to run
36 <command>setcap</command> on <command>systemd-detect-virt</command>,
37 which will fail if the kernel or file system does not support extended
38 capabilities:</para>
39
40<screen os="s2"><userinput>sed -i '/virt-install-hook /d' Makefile.in</userinput></screen>
41
42 <para os="s3">The <filename>timesyncd.conf</filename> file contains a
43 reference to a non-existent <filename>timesyncd.conf(5)</filename> man
44 page. Remove that reference to avoid possible confusion:</para>
45
46<screen os="s4"><userinput>sed -i '/timesyncd.conf/d' src/timesync/timesyncd.conf.in</userinput></screen>
47
48 <para os="s5">By default, <command>systemd-fsck</command> will run
49 <filename>/sbin/fsck</filename> with the <option>-l</option> option, which
50 applies an <function>flock</function> on the file system being checked.
51 This can conflict with an <function>flock</function> that
52 systemd itself puts on the file system, which could result in problems
53 booting. <command>fsck</command> will be fixed to avoid this problem in a
54 future release of Util-linux, but for now we will work around the issue by
55 simply preventing <command>systemd-fsck</command> from using <option>-l</option>:</para>
56
57<screen os="s6"><userinput>sed -i '/-l/d' src/fsck/fsck.c</userinput></screen>
58
59 <para os="a">Prepare systemd for compilation:</para>
60
61<screen os="b"><userinput>./configure --prefix=/usr \
62 --sysconfdir=/etc --localstatedir=/var \
63 --libexecdir=/usr/lib --docdir=/usr/share/doc/systemd-&systemd-version; \
64 --with-rootprefix="" --with-rootlibdir=/lib \
65 --enable-split-usr --disable-gudev --with-kbd-loadkeys=/bin/loadkeys \
66 --with-kbd-setfont=/bin/setfont --with-dbuspolicydir=/etc/dbus-1/system.d \
67 --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
68 --with-dbussessionservicedir=/usr/share/dbus-1/services \
69 --with-dbussystemservicedir=/usr/share/dbus-1/system-services</userinput></screen>
70
71 <variablelist os="c">
72 <title>The meaning of the configure options:</title>
73
74 <varlistentry>
75 <term><parameter>--with-root*</parameter></term>
76 <listitem>
77 <para>These switches ensure that core programs and
78 shared libraries are installed in the subdirectories
79 of the root partition.</para>
80 </listitem>
81 </varlistentry>
82
83 <varlistentry>
84 <term><parameter>--enable-split-usr</parameter></term>
85 <listitem>
86 <para>This switch ensures that systemd will work on
87 systems where /bin, /lib and /sbin directories are not
88 symlinks to their /usr counterparts.</para>
89 </listitem>
90 </varlistentry>
91
92 <varlistentry>
93 <term><parameter>--disable-gudev</parameter></term>
94 <listitem>
95 <para>This switch prevents systemd from building
96 <filename class="libraryfile">libgudev</filename> as it requires
97 Glib, which is not installed in CLFS.</para>
98 </listitem>
99 </varlistentry>
100
101 <varlistentry>
102 <term><parameter>--with-dbus*</parameter></term>
103 <listitem>
104 <para>These switches ensure that D-Bus configuration files get
105 installed to the correct locations.</para>
106 </listitem>
107 </varlistentry>
108 </variablelist>
109
110 <para os="d">Compile the package:</para>
111
112<screen os="e"><userinput>make</userinput></screen>
113
114 <para os="f">Prevent a broken test case from running:</para>
115
116<screen os="g"><userinput remap="test">sed -e "s:test/udev-test.pl::g" \
117 -e "s:test-bus-cleanup\$(EXEEXT) ::g" \
118 -e "s:test-bus-gvariant\$(EXEEXT) ::g" \
119 -i Makefile</userinput></screen>
120
121 <para os="h">To test the results, issue:</para>
122
123<screen os="i"><userinput remap="test">make check</userinput></screen>
124
125 <para os="j">Install the package:</para>
126
127<screen os="k"><userinput>make install</userinput></screen>
128
129 <para os="l">Install documentation files that are not installed by default:</para>
130
131<screen os="m"><userinput>install -v -m644 man/*.html /usr/share/doc/systemd-&systemd-version;</userinput></screen>
132
133 <para os="n">Move the
134 <filename class="libraryfile">nss_myhostname</filename> library to
135 <filename class="directory">/lib</filename>:</para>
136
137<screen os="o"><userinput>mv -v /usr/lib/libnss_myhostname.so.2 /lib</userinput></screen>
138
139 <para os="p">Remove an unnecessary directory:</para>
140
141<screen os="q"><userinput>rm -rfv /usr/lib/rpm</userinput></screen>
142
143 <para os="r">Create symlinks for backwards-compatibility with Sysvinit:</para>
144
145<screen os="s"><userinput>for tool in runlevel reboot shutdown poweroff halt telinit; do
146 ln -sfv ../bin/systemctl /sbin/$tool
147done
148ln -sfv ../lib/systemd/systemd /sbin/init</userinput></screen>
149
150 <para os="t">Modify a configuration file which references a group that
151 doesn't exist:</para>
152
153<screen os="u"><userinput>sed -i "s@root lock@root root@g" /usr/lib/tmpfiles.d/legacy.conf</userinput></screen>
154
155 </sect2>
156
157 <sect2 id="conf-systemd" role="configuration">
158 <title>Configuring Systemd</title>
159
160 <indexterm zone="conf-systemd">
161 <primary sortas="a-systemd">systemd</primary>
162 <secondary>configuring</secondary></indexterm>
163
164 <indexterm zone="conf-systemd">
165 <primary sortas="e-/etc/os-release">/etc/os-release</primary>
166 </indexterm>
167
168 <para>Create <filename>/etc/machine-id</filename> which is needed
169 by Journald:</para>
170
171<screen><userinput>systemd-machine-id-setup</userinput></screen>
172
173 <para>Create a file to identify the operating system.
174 <command>systemd</command> will use this file on boot to put information
175 on the screen.</para>
176
177<screen><userinput>cat &gt; /etc/os-release &lt;&lt; "EOF"
178# Begin /etc/os-release
179
180NAME=Cross-LFS
181ID=clfs
182
183PRETTY_NAME=Cross Linux From Scratch
184ANSI_COLOR=0;33
185
186VERSION=&version;
187VERSION_ID=&versionid;
188
189# End /etc/os-release
190EOF</userinput></screen>
191
192 </sect2>
193
194 <sect2 id="contents-systemd" role="content">
195 <title>Contents of Systemd</title>
196
197 <segmentedlist>
198 <segtitle>Installed programs</segtitle>
199 <segtitle>Installed libraries</segtitle>
200 <segtitle>Installed directories</segtitle>
201
202 <seglistitem>
203 <seg>bootctl, busctl, halt (link to systemctl), hostnamectl,
204 init (link to systemd), journalctl, kernel-install, localectl, loginctl,
205 machinectl, poweroff (link to systemctl), reboot (link to systemctl),
206 runlevel (link to systemctl), shutdown (link to systemctl),
207 systemctl, systemd, system-analyze, systemd-ask-password, systemd-cat,
208 systemd-cgls, systemd-cgtop, systemd-coredumpctl, systemd-delta,
209 systemd-detect-virt, systemd-inhibit, systemd-machine-id-setup,
210 systemd-notify, systemd-nspawn, systemd-run, systemd-stdio-bridge
211 (link to systemd-bus-proxyd), systemd-tmpfiles,
212 systemd-tty-ask-password-agent, telinit (link to systemctl),
213 timedatectl, udevadm</seg>
214 <seg>libnss_myhostname.so, libsystemd.so, libudev.so</seg>
215 <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d,
216 /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev,
217 /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd,
218 /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d,
219 /usr/lib/sysctl.d, /usr/lib/systemd,
220 /usr/share/doc-systemd-&systemd-version;, /usr/share/systemd,
221 /usr/share/zsh, /var/lib/systemd</seg>
222 </seglistitem>
223 </segmentedlist>
224
225 <variablelist>
226 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
227 <?dbfo list-presentation="list"?>
228 <?dbhtml list-presentation="table"?>
229
230 <varlistentry id="bootctl">
231 <term><command>bootctl</command></term>
232 <listitem>
233 <para>Controls the firmware and boot manager settings</para>
234 <indexterm zone="ch-system-systemd bootctl">
235 <primary sortas="b-bootctl">bootctl</primary>
236 </indexterm>
237 </listitem>
238 </varlistentry>
239
240 <varlistentry id="busctl">
241 <term><command>busctl</command></term>
242 <listitem>
243 <para>Introspects and monitors the D-Bus bus</para>
244 <indexterm zone="ch-system-systemd busctl">
245 <primary sortas="b-busctl">busctl</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="halt">
251 <term><command>halt</command></term>
252 <listitem>
253 <para>Halts, powers off, or reboots the machine</para>
254 <indexterm zone="ch-system-systemd halt">
255 <primary sortas="b-halt">halt</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="hostnamectl">
261 <term><command>hostnamectl</command></term>
262 <listitem>
263 <para>Controls the system hostname</para>
264 <indexterm zone="ch-system-systemd hostnamectl">
265 <primary sortas="b-hostnamectl">hostnamectl</primary>
266 </indexterm>
267 </listitem>
268 </varlistentry>
269
270 <varlistentry id="init">
271 <term><command>init</command></term>
272 <listitem>
273 <para>systemd system and service manager</para>
274 <indexterm zone="ch-system-systemd init">
275 <primary sortas="b-init">init</primary>
276 </indexterm>
277 </listitem>
278 </varlistentry>
279
280 <varlistentry id="journalctl">
281 <term><command>journalctl</command></term>
282 <listitem>
283 <para>Queries the systemd journal</para>
284 <indexterm zone="ch-system-systemd journalctl">
285 <primary sortas="b-journalctl">journalctl</primary>
286 </indexterm>
287 </listitem>
288 </varlistentry>
289
290 <varlistentry id="kernel-install">
291 <term><command>kernel-install</command></term>
292 <listitem>
293 <para>Adds and removes kernel and initramfs images to and from
294 <filename class="directory">/boot</filename></para>
295 <indexterm zone="ch-system-systemd kernel-install">
296 <primary sortas="b-kernel-install">kernel-install</primary>
297 </indexterm>
298 </listitem>
299 </varlistentry>
300
301 <varlistentry id="localectl">
302 <term><command>localectl</command></term>
303 <listitem>
304 <para>Controls the system locale and keyboard layout settings</para>
305 <indexterm zone="ch-system-systemd localectl">
306 <primary sortas="b-localectl">localectl</primary>
307 </indexterm>
308 </listitem>
309 </varlistentry>
310
311 <varlistentry id="loginctl">
312 <term><command>loginctl</command></term>
313 <listitem>
314 <para>Controls the systemd login manager</para>
315 <indexterm zone="ch-system-systemd loginctl">
316 <primary sortas="b-loginctl">loginctl</primary>
317 </indexterm>
318 </listitem>
319 </varlistentry>
320
321 <varlistentry id="machinectl">
322 <term><command>machinectl</command></term>
323 <listitem>
324 <para>Controls the systemd machine manager</para>
325 <indexterm zone="ch-system-systemd machinectl">
326 <primary sortas="b-machinectl">machinectl</primary>
327 </indexterm>
328 </listitem>
329 </varlistentry>
330
331 <varlistentry id="poweroff">
332 <term><command>poweroff</command></term>
333 <listitem>
334 <para>Halts, powers off, or reboots the machine</para>
335 <indexterm zone="ch-system-systemd poweroff">
336 <primary sortas="b-poweroff">poweroff</primary>
337 </indexterm>
338 </listitem>
339 </varlistentry>
340
341 <varlistentry id="reboot">
342 <term><command>reboot</command></term>
343 <listitem>
344 <para>Halts, powers off, or reboots the machine</para>
345 <indexterm zone="ch-system-systemd reboot">
346 <primary sortas="b-reboot">reboot</primary>
347 </indexterm>
348 </listitem>
349 </varlistentry>
350
351 <varlistentry id="runlevel">
352 <term><command>runlevel</command></term>
353 <listitem>
354 <para>Prints previous and current SysV runlevel</para>
355 <indexterm zone="ch-system-systemd runlevel">
356 <primary sortas="b-runlevel">runlevel</primary>
357 </indexterm>
358 </listitem>
359 </varlistentry>
360
361 <varlistentry id="shutdown">
362 <term><command>shutdown</command></term>
363 <listitem>
364 <para>Halts, powers off, or reboots the machine</para>
365 <indexterm zone="ch-system-systemd shutdown">
366 <primary sortas="b-shutdown">shutdown</primary>
367 </indexterm>
368 </listitem>
369 </varlistentry>
370
371 <varlistentry id="systemctl">
372 <term><command>systemctl</command></term>
373 <listitem>
374 <para>Control the systemd system and service manager</para>
375 <indexterm zone="ch-system-systemd systemctl">
376 <primary sortas="b-systemctl">systemctl</primary>
377 </indexterm>
378 </listitem>
379 </varlistentry>
380
381 <varlistentry id="systemd">
382 <term><command>systemd</command></term>
383 <listitem>
384 <para>System and service manager for Linux</para>
385 <indexterm zone="ch-system-systemd systemd">
386 <primary sortas="b-systemd">systemd</primary>
387 </indexterm>
388 </listitem>
389 </varlistentry>
390
391 <varlistentry id="systemd-analyze">
392 <term><command>systemd-analyze</command></term>
393 <listitem>
394 <para>Analyzes system boot-up permformance</para>
395 <indexterm zone="ch-system-systemd systemd-analyze">
396 <primary sortas="b-systemd-analyze">systemd-analyze</primary>
397 </indexterm>
398 </listitem>
399 </varlistentry>
400
401 <varlistentry id="systemd-ask-password">
402 <term><command>systemd-ask-password</command></term>
403 <listitem>
404 <para>Queries the user for a system passphrase, via the
405 TTY or an UI agent.</para>
406 <indexterm zone="ch-system-systemd systemd-ask-password">
407 <primary sortas="b-systemd-ask-password">systemd-ask-password</primary>
408 </indexterm>
409 </listitem>
410 </varlistentry>
411
412 <varlistentry id="systemd-cat">
413 <term><command>systemd-cat</command></term>
414 <listitem>
415 <para>Connects a pipeline or program's output with the journal</para>
416 <indexterm zone="ch-system-systemd systemd-cat">
417 <primary sortas="b-systemd-cat">systemd-cat</primary>
418 </indexterm>
419 </listitem>
420 </varlistentry>
421
422 <varlistentry id="systemd-cgls">
423 <term><command>systemd-cgls</command></term>
424 <listitem>
425 <para>Recursively shows control group contents</para>
426 <indexterm zone="ch-system-systemd systemd-cgls">
427 <primary sortas="b-systemd-cgls">systemd-cgls</primary>
428 </indexterm>
429 </listitem>
430 </varlistentry>
431
432 <varlistentry id="systemd-cgtop">
433 <term><command>systemd-cgtop</command></term>
434 <listitem>
435 <para>Shows top control groups by resource usage</para>
436 <indexterm zone="ch-system-systemd systemd-cgtop">
437 <primary sortas="b-systemd-cgtop">systemd-cgtop</primary>
438 </indexterm>
439 </listitem>
440 </varlistentry>
441
442 <varlistentry id="systemd-coredumpctl">
443 <term><command>systemd-coredumpctl</command></term>
444 <listitem>
445 <para>Retrieves coredumps from the journal</para>
446 <indexterm zone="ch-system-systemd systemd-coredumpctl">
447 <primary sortas="b-systemd-coredumpctl">systemd-coredumpctl</primary>
448 </indexterm>
449 </listitem>
450 </varlistentry>
451
452 <varlistentry id="systemd-delta">
453 <term><command>systemd-delta</command></term>
454 <listitem>
455 <para>Finds overridden configuration files</para>
456 <indexterm zone="ch-system-systemd systemd-delta">
457 <primary sortas="b-systemd-delta">systemd-delta</primary>
458 </indexterm>
459 </listitem>
460 </varlistentry>
461
462 <varlistentry id="systemd-detect-virt">
463 <term><command>systemd-detect-virt</command></term>
464 <listitem>
465 <para>Detects execution in a virtual environment</para>
466 <indexterm zone="ch-system-systemd systemd-detect-virt">
467 <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary>
468 </indexterm>
469 </listitem>
470 </varlistentry>
471
472 <varlistentry id="systemd-inhibit">
473 <term><command>systemd-inhibit</command></term>
474 <listitem>
475 <para>Executes a program with an inhibition lock taken</para>
476 <indexterm zone="ch-system-systemd systemd-inhibit">
477 <primary sortas="b-systemd-inhibit">systemd-inhibit</primary>
478 </indexterm>
479 </listitem>
480 </varlistentry>
481
482 <varlistentry id="systemd-machine-id-setup">
483 <term><command>systemd-machine-id-setup</command></term>
484 <listitem>
485 <para>Initializes the machine ID in
486 <filename>/etc/machine-id</filename></para>
487 <indexterm zone="ch-system-systemd systemd-machine-id-setup">
488 <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary>
489 </indexterm>
490 </listitem>
491 </varlistentry>
492
493 <varlistentry id="systemd-notify">
494 <term><command>systemd-notify</command></term>
495 <listitem>
496 <para>Notifies init system about start-up completion and other daemon
497 status changes</para>
498 <indexterm zone="ch-system-systemd systemd-notify">
499 <primary sortas="b-systemd-notify">systemd-notify</primary>
500 </indexterm>
501 </listitem>
502 </varlistentry>
503
504 <varlistentry id="systemd-nspawn">
505 <term><command>systemd-nspawn</command></term>
506 <listitem>
507 <para>Spawns a namespace container for debugging, testing, and
508 building</para>
509 <indexterm zone="ch-system-systemd systemd-nspawn">
510 <primary sortas="b-systemd-nspawn">systemd-nspawn</primary>
511 </indexterm>
512 </listitem>
513 </varlistentry>
514
515 <varlistentry id="systemd-run">
516 <term><command>systemd-run</command></term>
517 <listitem>
518 <para>Runs programs in transient scope or service units</para>
519 <indexterm zone="ch-system-systemd systemd-run">
520 <primary sortas="b-systemd-run">systemd-run</primary>
521 </indexterm>
522 </listitem>
523 </varlistentry>
524
525 <varlistentry id="systemd-stdio-bridge">
526 <term><command>systemd-stdio-bridge</command></term>
527 <listitem>
528 <para>Connects stdio or a socket to a given bus address</para>
529 <indexterm zone="ch-system-systemd systemd-stdio-bridge">
530 <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary>
531 </indexterm>
532 </listitem>
533 </varlistentry>
534
535 <varlistentry id="systemd-tmpfiles">
536 <term><command>systemd-tmpfiles</command></term>
537 <listitem>
538 <para>Creates, deletes, and cleans up volatile and temporary files</para>
539 <indexterm zone="ch-system-systemd systemd-tmpfiles">
540 <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary>
541 </indexterm>
542 </listitem>
543 </varlistentry>
544
545 <varlistentry id="systemd-tty-ask-password-agent">
546 <term><command>systemd-tty-ask-password-agent</command></term>
547 <listitem>
548 <para>Process system password requests</para>
549 <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent">
550 <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary>
551 </indexterm>
552 </listitem>
553 </varlistentry>
554
555 <varlistentry id="telinit">
556 <term><command>telinit</command></term>
557 <listitem>
558 <para>Tells <command>init</command> which run-level to change to</para>
559 <indexterm zone="ch-system-systemd telinit">
560 <primary sortas="b-telinit">telinit</primary>
561 </indexterm>
562 </listitem>
563 </varlistentry>
564
565 <varlistentry id="timedatectl">
566 <term><command>timedatectl</command></term>
567 <listitem>
568 <para>Controls the system time and date</para>
569 <indexterm zone="ch-system-systemd timedatectl">
570 <primary sortas="b-timedatectl">timedatectl</primary>
571 </indexterm>
572 </listitem>
573 </varlistentry>
574
575 <varlistentry id="udevadm">
576 <term><command>udevadm</command></term>
577 <listitem>
578 <para>Udev management tool</para>
579 <indexterm zone="ch-system-systemd udevadm">
580 <primary sortas="b-udevadm">udevadm</primary>
581 </indexterm>
582 </listitem>
583 </varlistentry>
584
585 <varlistentry id="libnss_myhostname">
586 <term><filename class="libraryfile">libnss_myhostname</filename></term>
587 <listitem>
588 <para>Plugin for the GNU Name Service Switch (NSS) functionality
589 of Glibc, provding hostname resolution for the locally configured
590 system hostname</para>
591 <indexterm zone="ch-system-systemd libnss_myhostname">
592 <primary sortas="c-libnss_myhostname">libnss_myhostname</primary>
593 </indexterm>
594 </listitem>
595 </varlistentry>
596
597 <varlistentry id="libsystemd">
598 <term><filename class="libraryfile">libsystemd</filename></term>
599 <listitem>
600 <para>Support library for systemd</para>
601 <indexterm zone="ch-system-systemd libsystemd">
602 <primary sortas="c-libsystemd">libsystemd</primary>
603 </indexterm>
604 </listitem>
605 </varlistentry>
606
607 <varlistentry id="libudev">
608 <term><filename class="libraryfile">libudev</filename></term>
609 <listitem>
610 <para>A library interface to Udev device information.</para>
611 <indexterm zone="ch-system-systemd libudev">
612 <primary sortas="c-libudev">libudev</primary>
613 </indexterm>
614 </listitem>
615 </varlistentry>
616
617 </variablelist>
618
619 </sect2>
620
621</sect1>
Note: See TracBrowser for help on using the repository browser.