Differences between revisions 29 and 30
Revision 29 as of 2018-08-13 17:06:27
Size: 2880
Editor: GregWooledge
Comment:
Revision 30 as of 2018-10-24 19:55:49
Size: 3321
Editor: GregWooledge
Comment: Apparently runit-init was pulled from Debian late in stretch's freeze.
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
Since jessie, only systemd is fully supported; sysvinit is mostly supported, but Debian packages are not ''required'' to provide sysvinit start scripts. [[runit]] is also packaged, but has not received the same level of testing and support as the others. Since jessie, only systemd is fully supported; sysvinit is mostly supported, but Debian packages are not ''required'' to provide sysvinit start scripts. [[runit]] is also packaged, but has not received the same level of testing and support as the others, and is not currently supported as PID 1.
Line 26: Line 26:
In stretch, you may change from systemd to runit by performing these steps: During most of stretch's time as testing, you could change from systemd to runit by performing these steps:
Line 32: Line 32:

However, the [[DebPkg:runit-init]] package was removed from Debian shortly before stretch's release. Currently, runit is ''not'' supported as an init system in Debian, although that may change in the future, and ''might'' work in testing or unstable, although any attempt to do this is done at your own risk. (See DebianBug:861536 for discussion of the removal.)

Translation(s): English - Français - Italiano - Русский


BootProcess > init


Init is the first program to run after your system is booted, and continues to run as process number 1 until your system halts. Init's job is to start other programs that are essential to the operation of your system. All other processes are descended from init.

Overview

The system initialization process is handled by the init daemon. In squeeze and earlier releases, that daemon is provided by the sysvinit package, and no alternatives are supported. In wheezy, the default init daemon is still sysvinit, but a "technology preview" of systemd is available. In jessie and stretch, the default init system is systemd, but switching to sysvinit is supported.

Since jessie, only systemd is fully supported; sysvinit is mostly supported, but Debian packages are not required to provide sysvinit start scripts. runit is also packaged, but has not received the same level of testing and support as the others, and is not currently supported as PID 1.

Determining the init system

In general, you can determine which init system is installed by checking whether the /sbin/init file is a symlink. If it's not a symlink, then sysvinit is probably in use. If it's a symlink pointing to /lib/systemd/systemd then systemd is in use. If it's a symlink pointing to /lib/sysvinit/init then sysvinit is in use.

If you suspect that the init system may have been changed without a reboot, you may also cat /proc/1/comm to see which command name was used for the init daemon during the most recent boot.

Changing the init system

In stretch, you may change from systemd to sysvinit by performing these steps:

  1. apt-get install sysvinit-core

  2. reboot

During most of stretch's time as testing, you could change from systemd to runit by performing these steps:

  1. apt-get install runit-systemd

  2. reboot
  3. apt-get install runit-init

  4. reboot again

However, the runit-init package was removed from Debian shortly before stretch's release. Currently, runit is not supported as an init system in Debian, although that may change in the future, and might work in testing or unstable, although any attempt to do this is done at your own risk. (See 861536 for discussion of the removal.)

Sysvinit configuration

The inittab configuration tells init what to do. Especially it contains the lines:

  • id:2:initdefault:
    
    si::sysinit:/etc/init.d/rcS
    
    l2:2:wait:/etc/init.d/rc 2

Which causes the files /etc/init.d/rcS to run initialization scripts (in /etc/rcS.d/*), then scripts for requested runlevel (in /etc/rcS.[0-9]/*).

See also


CategoryBootProcess