[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Transition plan for changing the default init system



Hi all,

We're now at the point where we want to flip the default init system for
Jessie on Linux. A lot of systems have already switched over to systemd
as their init system [0] and the package received a fair amount of
testing and integration work over the last couple of months. This makes
us pretty confident that not too much will break when we flip the
default. To ensure we have enough time to fix any of the rarer problems
people are likely to encounter, we should proceed with the switch as
soon as possible.

The sysvinit package in wheezy is marked as an essential package. Simply
removing the Essential flag from the sysvinit package and adding it to
the systemd-sysv package is not sufficient if we want to make the switch
within one release cycle.

Thankfully, Steve Langasek already did the groundwork to make the switch
within one release cycle possible. The contents of the sysvinit package
were moved into a new sysvinit-core package and the sysvinit package was
changed to simply become a meta package depending on an ORed list of
alternative init systems [1]. Switching the default would be as simple
as changing the order of the dependencies and adjusting the priorities
of affected packages.

Unfortunately this approach has some downsides. Most importantly it
treats new installations the same as upgrades as it switches all systems
to systemd forcefully removing the /sbin/init binary provided by
sysvinit along with it. In case of an upgrade we want to provide
additional safety measures though.

So we are proposing the following scheme:

a/ Upload a new "init" package. This is a new, essential package that
will replace sysvinit as the package that ensures your system has an
init system. We want to build this binary package from a package which
is not tied to an actual init system, so we chose the
init-system-helpers source package. Patch for init-system-helpers is
available at [2].

b/ Demote sysvinit to Priority: optional and install an extra copy of
the sysvinit binary into /lib/sysvinit/ so you can recover if your
system fails to boot with systemd. This can be achieved by booting with
init=/lib/sysvinit/init on the kernel command line. Patch for sysvinit
is available at [3].

c/ Upload a new version of the init package which does the actual switch
and changes the order via Pre-Depends: systemd-sysv |
sysvinit-core. Diff[4]

d/ Adjust the priorities of systemd and systemd-sysv.

Assuming there are no major objections to this approach, we are going to
start with this process next week.

New installations
=================
The new "init" package will ensure that systemd-sysv is installed as
default init on Linux and by demoting the priority of sysvinit and
sysvinit-core to optional those packages will not be installed anymore.

Dist upgrades
=============
On upgrades, the old, essential sysvinit package will be replaced by the
new, non-essential sysvinit package which pulls in the new "init"
package which in turn makes sure systemd-sysv is installed.

The sysvinit package in Jessie will be kept as a transitional and
recovery package which facilitates a smooth upgrade. It provides a
safety net which will let you boot with sysvinit via the aforementioned
kernel command line argument in case your system fails to boot with
systemd. We also have a patch for grub [5] which will make this even
more straightforward. The SysV compat tools provided by systemd-sysv
(/sbin/reboot,runlevel,telinit,etc) are able to talk to sysvinit as PID
1, making this a seamless experience.

Opting out of the switch
========================
If users want to opt out of the switch, they can install the
sysvinit-core package which will satisfy the dependency of the "init"
package.

[0]: https://qa.debian.org/popcon.php?package=systemd
[1]: https://packages.qa.debian.org/s/sysvinit/news/20131227T000039Z.html
[2]: http://people.debian.org/~biebl/systemd-transition/init-system-helper-step1.diff
[3]: http://people.debian.org/~biebl/systemd-transition/sysvinit.diff
[4]: http://people.debian.org/~biebl/systemd-transition/init-system-helper-step2.diff
[5]: http://people.debian.org/~biebl/systemd-transition/grub2.diff

-- 
Michael Biebl and Tollef Fog Heen, on behalf of the systemd team


Reply to: