Bullseye release notes / install instructions for alternative inits

Matthew Vernon matthew at debian.org
Fri Jul 23 10:23:22 BST 2021


I recently installed a new laptop using the latest Bullseye installer, 
and it was reasonably straightforward :) I think we at least want 
something in the install instructions on selecting alternative init 
systems, and maybe also in the release notes on how to switch an 
already-installed system?

As a starter for ten, here are some rough drafts:
[I've tested the install myself, not the upgrade]

* Install instructions ( 
https://www.debian.org/releases/testing/amd64/index )

[not sure where to put this - as a new section 6.3.11 maybe ?]

Installing an alternative init system

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.

The best time to perform the switch is after the "Selecting and 
installing software" stage [link to]; though note that the 
default GNOME desktop environment will only work with systemd - so if 
you want a desktop environment installed, then deselect GNOME and select 
another (Xfce, for example, works well without systemd).

Once that stage is complete, launch a shell (see Using the 
Shell and Viewing the Logs), and chroot into the installed system by 
typing `chroot /target`. You then need to tell `apt` 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 `apt-get install sysvinit-core libpam-elogind`. This will install 
your new init system and elogind, and remove systemd, libpam-systemd and 
other components that can only work with systemd. If `apt` 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.

Once that is done, exit the chroot by typing `exit`, then switch back to 
the installer (if you were using a different virtual console by 
switching back; if you had selected the "Execute a shell" menu option, 
then by typing `exit` once more), and resume the installation by moving 
to the boot loader installation stage, which is typically installing 
GRUB (see 6.3.7. Making Your System Bootable). You can now complete the 
installation process as normal.

If you encounter any issues specifically associated with using an 
alternative init system, there is a Debian init system diversity list 
[debian-init-diversity at chiark.greenend.org.uk] who may be able to help.

* Release notes ( 
https://www.debian.org/releases/testing/amd64/release-notes/index )

I think this is a new section under "5.2. Items not limited to the 
upgrade process"

Switching init system

The default init system in Debian is systemd. In bullseye, a number of 
alternative init systems are supported (such as System-V-style init and 
OpenRC). Generally, to switch between init systems, you install the new 
init system and reboot. The exception is switching away from systemd - 
systemd's packages will refuse to be removed if systemd is running; so 
the process is a little more involved.

In outline, you need to download the new packages you need, switch to 
single-user mode, install these new packages, and then reboot. The 
recommended approach is as follows. First, clear out 
`/var/cache/apt/archives` by running `apt-get clean` (this makes 
identifying the packages to install later easier). Next, get `apt` to 
download the new packages you need, e.g.: `apt-get --download-only 
install sysvinit-core libpam-elogind`; libpam-elogind (and elogind which 
it Depends upon) provide session management facilities, which you will 
likely need on any system running a desktop environment. At this point, 
review apt's proposed actions, and if happy, let it carry on.

Now switch to single-user mode (`systemctl rescue`) and install the 
packages you downloaded using `dpkg -i`; the packages will be in 
`/var/cache/apt/archives`. Once dpkg has completed, reboot your system.

If you encounter any issues specifically associated with using an 
alternative init system, there is a Debian init system diversity list 
[debian-init-diversity at chiark.greenend.org.uk] who may be able to help.



More information about the Debian-init-diversity mailing list