Bug#992034: installation-guide: Include a note on how to change init system during install

Matthew Vernon matthew at debian.org
Mon Aug 9 15:36:33 BST 2021

Source: installation-guide
Severity: normal
Tags: patch


I've drafted a note on how to switch init system during the
installation process; it's easiest to do it at this point rather than
post-install, because it's tricky to remove the systemd package once
systemd is running as pid 1.

Could you include it in the install guide for bullseye, please? :)



-- System Information:
Debian Release: 9.13
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-16-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
-------------- next part --------------
>From 8a1342942cedd48a4a5655e9efc07e6bbd23bff5 Mon Sep 17 00:00:00 2001
From: Matthew Vernon <matthew at debian.org>
Date: Mon, 9 Aug 2021 15:32:27 +0100
Subject: [PATCH] Notes on installing an alternative init system

The easiest time to switch init system is during the install (once
systemd is running as pid 1, it's harder to remove the systemd
package), so document how to do so.
 en/using-d-i/components.xml    |  1 +
 en/using-d-i/modules/inits.xml | 78 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+)
 create mode 100644 en/using-d-i/modules/inits.xml

diff --git a/en/using-d-i/components.xml b/en/using-d-i/components.xml
index 702185e97..976d37c96 100644
--- a/en/using-d-i/components.xml
+++ b/en/using-d-i/components.xml
@@ -188,4 +188,5 @@ user in case something goes wrong.
diff --git a/en/using-d-i/modules/inits.xml b/en/using-d-i/modules/inits.xml
new file mode 100644
index 000000000..419a54fb1
--- /dev/null
+++ b/en/using-d-i/modules/inits.xml
@@ -0,0 +1,78 @@
+<!-- retain these comments for translator revision tracking -->
+<!-- $Id$ -->
+<sect2 id="inits">
+  <title>Installing an alternative init system</title>
+  <para>
+    &debian; uses systemd as its default init system. Other init
+    systems (such as sysvinit and OpenRC) are supported, and the
+    easiest time to select an alternative init system is during the
+    installation process.
+  </para>
+  <para>
+    The best time to perform the switch is after <xref
+    linkend="pkgsel"/>. Note that the default GNOME desktop is harder
+    to get to work without systemd in &releasename;,<footnote>
+    <para>
+      Because its usual display-manager
+      <application>gdm3</application> declares a dependency on
+      <application>libpam-systemd</application>
+    </para>
+    </footnote> so if you want a desktop environment it will be easier
+    to deselect GNOME and select another (Xfce, KDE Plasma, LXDE,
+    Cinnamon, MATE, and LXQt have all been tested without systemd).
+  </para>
+  <para>
+    Once that stage is complete, launch a shell (see <xref
+    linkend="shell"/>), and chroot into the installed system by typing
+    <command>chroot /target</command>. You then need to tell
+    <command>apt</command> to install your preferred init system and,
+    unless you are not using a desktop environment at all,
+    libpam-elogind to provide the necessary elogind session management
+    facilities (which are provided by libpam-systemd and systemd in a
+    default installation). For example, for System-V-like init, type
+    <command>apt install sysvinit-core libpam-elogind</command>. This
+    will install your new init system and elogind, and remove systemd,
+    libpam-systemd and other components that can only work with
+    systemd. If <command>apt</command> is proposing to remove a very
+    large number of packages, then you probably selected a desktop
+    environment that depends on systemd; it will be best to stop at
+    this point and go back to the task selector to chose another
+    instead.
+  </para>
+  <para>
+    Once that is done, exit the chroot by typing
+    <command>exit</command>, then switch back to the installer (if you
+    were using a different virtual console by switching back; if you
+    had selected the <guimenuitem>Execute a shell</guimenuitem> menu
+    option, then by typing <command>exit</command> once more), and
+    resume the installation by moving to the boot loader installation
+    stage, which is typically installing GRUB (see <xref
+    linkend="di-make-bootable"/>). You can now complete the
+    installation process as normal.
+  </para>
+  <para>
+    If you encounter any issues specifically associated with using an
+    alternative init system, there is a <ulink
+    url="https://www.chiark.greenend.org.uk/mailman/listinfo/debian-init-diversity/">Debian
+    init system diversity list</ulink> who may be able to help.
+  </para>

More information about the Debian-init-diversity mailing list