Differences between revisions 202 and 203
Revision 202 as of 2013-05-05 03:38:53
Size: 7364
Editor: GeoffSimmons
Comment: Adjust translation header, limit automatic linking, InterWiki, add CategoryPermalink.
Revision 203 as of 2013-05-05 10:10:41
Size: 7365
Comment: typo
Deletions are marked like this. Additions are marked like this.
Line 26: Line 26:
 * CONFIG_FANOTIFY=y, optional, required for systemd readahead. availabe in Linux kernel >= 2.6.37-rcX.  * CONFIG_FANOTIFY=y, optional, required for systemd readahead. available in Linux kernel >= 2.6.37-rcX.

Translation(s): English - Russian


systemd - system and service manager

Introduction

systemd is a system and service manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.

Installation

To install systemd run:

# apt-get update
# apt-get install systemd

The kernels in Debian wheezy are fine for systemd, but if you run a self-compiled kernel, make sure you have 2.6.39 or newer and enable the following options:

  • CONFIG_DEVTMPFS=y
  • CONFIG_CGROUPS=y
  • CONFIG_AUTOFS4_FS=[y|m]
  • CONFIG_IPV6=[y|m], optional, but highly recommended
  • CONFIG_FANOTIFY=y, optional, required for systemd readahead. available in Linux kernel >= 2.6.37-rcX.

For an up-to-date list, see section "REQUIREMENTS" in the upstream README file.

Known Issues and Workarounds

Issue #1: sysvinit vs. systemd-sysv

sysvinit is the current default init-system in Debian and is flagged as an "Essential" package. This means the package management tools will refuse to remove or replace the package unless forced. Also on dist-upgrades essential packages are preferred and will be re-installed. For more Details see chapters "3.8 Essential packages" and "5.6.9 Essential"

The systemd-sysv package ships /sbin/init (as a symlink to /bin/systemd) and therefore conflicts with the sysvinit package.

Workaround #1: Do not install systemd-sysv, enhance grub-line (Kernel command line) by "init=/bin/systemd". For a grub2 persistent solution (requires an update-grub to refresh /boot/grub/grub.cfg):

# $EDITOR /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet init=/lib/systemd/systemd" <--- Change this line

# update-grub

Workaround #2: Install systemd-sysv and put package "on hold".

The problem with "Essential flag" needs some discussion with the sysvinit maintainer.

Debugging systemd

Sometimes it is necessary to investigate why systemd hangs on startup or on reboot/shutdown.

Solution #0: Remove "quiet" from Kernel command line (so called "cmdline" or "grub line")

Solution #1: Increase verbosity via cmdline: Add "systemd.log_target=kmsg systemd.log_level=debug"

Of course you can have a "temporary" persistent solution:

[ /etc/default/grub ]
GRUB_CMDLINE_LINUX="systemd.log_target=kmsg systemd.log_level=debug" <--- Add here (by uncommenting you can easily switch to debug)

# update-grub

In addition enhance cmdline with "systemd.sysv_console=1" (0: disabled, 1: enabled).

Solution #2: Increase verbosity via /etc/systemd/system.conf

LogLevel=debug           <--- Uncomment this line and use "debug" (default: commented and "info")
LogTarget=syslog-or-kmsg <--- Uncomment this line (default: commented)
SysVConsole=yes          <--- Uncomment this line (default: commented)

HINT: "man system" and "man systemd.conf" (Note: File is system.conf vs. man-page system*d*.conf)

HINT: How to check Kernel command line parameters/options?

# cat /proc/cmdline

NOTE on LogLevel (see systemd(1) and systemd.conf(5)):

"Set log level. As argument this accepts a numerical log level or the well-known syslog(3) symbolic names (lowercase): emerg, alert, crit, err, warning, notice, info, debug."

HINT: Keep a copy of /sbin/init from sysvinit package in case of rescue (so you can use init=/sbin/init.sysvinit in cmdline)!

# cp -av /sbin/init /sbin/init.sysvinit <--- Before installing systemd-sysv package

See also http://fedoraproject.org/wiki/How_to_debug_Systemd_problems

Bugs and Bug-Tracking-Systems

TODO

Where to get help?

As systemd is a very young project (see [1]), we would appreciate to use the existing upstream infrastructure like mailing-list [2], IRC (#debian-systemd) and read Lennart's blog [3], etc. for following the development. Most people interested in systemd development (from diverse distributions) and Debian-specific packaging are around on IRC: #systemd (irc.freenode.net). Anyway, Debian-specific bugs should be sent to Debian-BTS (for example use report-bug tool).

  1. http://0pointer.de/blog/projects/systemd.html

  2. http://lists.freedesktop.org/mailman/listinfo/systemd-devel

  3. http://0pointer.de/blog/

Resources

References


CategoryPermalink