Difference between revisions of "Init"

From ArchWiki
Jump to navigation Jump to search
Line 18: Line 18:
 
* {{App|[[Wikipedia:Upstart|Upstart]]|Event-based init system which handles starting, stopping and supervising of tasks and services.|http://upstart.ubuntu.com/|{{AUR|upstart}}}}
 
* {{App|[[Wikipedia:Upstart|Upstart]]|Event-based init system which handles starting, stopping and supervising of tasks and services.|http://upstart.ubuntu.com/|{{AUR|upstart}}}}
 
* {{App|initng|Dependency-based init system with parallelization and asynchronous start.|http://initng.sourceforge.net/trac|{{AUR|initng-git}}}}
 
* {{App|initng|Dependency-based init system with parallelization and asynchronous start.|http://initng.sourceforge.net/trac|{{AUR|initng-git}}}}
* {{App|Epoch|Single-threaded init system designed for minimal footprint, compatibility and unified configuration.|http://universe2.us/epoch.html|}}
+
* {{App|Epoch|Single-threaded init system designed for minimal footprint, compatibility and unified configuration.|http://universe2.us/epoch.html|}}{{AUR|epoch-init-system}}
 
* {{App|finit|Small init system written in Ruby supporting cgroups and socket activation.|https://github.com/felipec/finit/|}}
 
* {{App|finit|Small init system written in Ruby supporting cgroups and socket activation.|https://github.com/felipec/finit/|}}
  

Revision as of 16:32, 1 January 2015

Warning: Only systemd is officially supported in Arch Linux. When using a different init system, please mention so in support requests.

Init is the first process started during system boot. It is a a daemon process that continues running until the system is shut down. Init is the direct or indirect ancestor of all other processes, and automatically adopts all orphaned processes. It is started by the kernel using a hard-coded filename; if the kernel is unable to start it, panic will result. Init is typically assigned process identifier 1.

The init scripts (or rc) are launched by the init process to guarantee basic functionality on system start and shutdown. This includes (un)mounting of file systems and launching of daemons. A service manager takes this one step further by providing active control over launched processes, or process supervision. An example is to monitor for crashes and restart processes accordingly.

These components combine to the init system. Some inits include the service manager in the init process, or have init scripts in close relation to them. These inits are below referred to as integrated, though entries in different categories may explicitely depend on each other.

Inits (integrated)

  • systemd — Dependency-based init system with aggressive parallelization, process supervision using cgroups, and the ability to depend on a given mount point or dbus service.
http://freedesktop.org/wiki/Software/systemd/ || systemd
  • uselessd — A fork of systemd v208.
http://uselessd.darknedgy.net/ || uselessdAUR
  • Upstart — Event-based init system which handles starting, stopping and supervising of tasks and services.
http://upstart.ubuntu.com/ || upstartAUR
  • initng — Dependency-based init system with parallelization and asynchronous start.
http://initng.sourceforge.net/trac || initng-gitAUR
  • Epoch — Single-threaded init system designed for minimal footprint, compatibility and unified configuration.
http://universe2.us/epoch.html || epoch-init-systemAUR
  • finit — Small init system written in Ruby supporting cgroups and socket activation.
https://github.com/felipec/finit/ ||

Inits

  • BusyBox — Utilities for rescue and embedded systems.
http://busybox.net/ || busybox
http://savannah.nongnu.org/projects/sysvinit || sysvinitAUR
  • minit — Minimalist, dependency-based init.
http://www.fefe.de/minit/ || minitAUR
  • sinit — Simple init initially based on Rich Felker’s minimal init.
http://tools.suckless.org/sinit || sinitAUR

Init scripts

  • initscripts-fork — Maintained fork of SysVinit scripts in Arch Linux.
https://bitbucket.org/TZ86/initscripts-fork/overview || initscripts-forkAUR
  • minirc — Minimal init script designed for BusyBox.
https://github.com/hut/minirc/ || minirc-gitAUR
  • OpenRC Arch services — OpenRC service scripts compatible to Arch Linux.
https://github.com/andrewgregory/openrc-arch-services || openrc-arch-services-gitAUR
  • spark-rc — A simple rc script to kickstart your system.
https://github.com/fbt/spark-rc || spark-rcAUR
  • watchman-sm-services — Examples of services for watchman.
https://github.com/fbt/watchman-services || watchman-sm-services-gitAUR

Service managers

  • daemontools — Collection of tools for managing UNIX services.
http://cr.yp.to/daemontools.html || daemontoolsAUR
  • Monit — Monit is a process supervision tool for Unix and Linux. With monit, system status can be viewed directly from the command line, or via the native HTTP(S) web server.
http://mmonit.com/monit/ || monit
  • OpenRC — Dependency-based rc system that works with the system-provided init, normally SysVinit.
http://www.gentoo.org/proj/en/base/openrc/ || openrcAUR / openrc-coreAUR
  • perp — Persistent process (service) supervisor and managment framework for UNIX.
http://b0llix.net/perp/ || perpAUR
  • runit — UNIX init scheme with service supervision, a replacement for SysVinit, and other init schemes.
http://smarden.org/runit/ || runitAUR
  • s6 — Small suite of programs for UNIX, designed to allow service supervision in the line of daemontools and runit.
http://skarnet.org/software/s6/ || s6AUR
  • watchman — A not-so-simple service manager for Linux.
https://github.com/fbt/watchman || watchman-smAUR

Troubleshooting

This section addresses potential problems when not using systemd.

Cron functionality

Arch uses timer files instead of cron by default. See [1] for example cron jobs.

Group permissions

Systemd handles groups with logind and local sessions. Without them, users should add themselves to the respective groups (such as audio, video) and reboot.

Policykit agents require an active session, but rules can be adjusted manually.

Rootless X (1.16)

See Xorg#Rootless Xorg (v1.16).

Start X on the same TTY

See [2].

Syslog-ng

Syslog-ng is configured for journalctl by default. Edit /etc/syslog-ng/syslog-ng.conf:

source src {
 unix-stream("/dev/log");
 internal();
 file("/proc/kmsg");
};

See Syslog-ng#Sources for details.

See also