Installing Debian bookworm without systemd
Instructions
Get the official installation image from the usual locations. I got the netinst CD image via BitTorrent.
Boot from the image and go through the installation in the normal way.
You may want to select an alternative desktop environment (and unselect GNOME). These steps have been tested with MATE.
Stop when you are asked to remove the installation media and reboot.
Press Alt + Right arrow to switch to the text VC. Hit return to activate the console and run the following commands (answering yes as appropriate):
chroot /target bash
apt-get install sysvinit-core elogind ntp dbus-x11
apt-get autoremove
exit
Observe the output from the
apt-get install
. If your disk arrangements are unusual, that may generate some error messages fromupdate-initramfs
.Go back to the installer VC with Alt + Left arrow. If there were no error messages above, you may tell it to reboot.
If there were error messages (for example, I found that if there was disk encryption, alarming messages were printed), tell the installer to go “Back”. Then ask it to “Install GRUB bootloader” (again). After that has completed, you may reboot.
Enjoy your Debian system without systemd.
Discussion
This is pleasingly straightforward, albeit with an ugly wart. This recipe was not formally developed and tested; it’s just what happened when I tried to actually perform this task.
The official installation guide has similar instructions although they don’t seem to have the initramfs workaround.
update-initramfs
The need to go back and have the installer reinstall grub is because if your storage is not very straightforward, the update-initramfs
caused by apt-get install
apparently doesn’t have all the right context. I haven’t investigated this at all; indeed, I don’t even really know that the initramfs generated in step 3 above was broken, although the messages did suggest to me that important pieces or config might have been omitted. Instead, I simply chose to bet that it might be broken, but that the installer would know what to do. So I used the installer’s “install GRUB bootloader” option, which does regenerate the initramfs. So, I don’t know that step 6 is necessary.
In principle it would be better to do the switch from systemd to sysvinit earlier in the installation process, and under the control of the installer. But by default the installer goes straight from the early setup questions through to the “set the time” or “reboot” questions, without stopping. One could use the expert mode, or modify the command line, or something, but all of those things are, in practice, a lot more typing and/or interaction. And as far as I’m aware the installer doesn’t have an option for avoiding systemd .
The apt-get install
line
sysvinit-core
is the principal part of the sysvinit init system. Asking to install that causes the deinstallation of systemd’s init and ancillary packages.
systemd refuses to allow itself to be deinstalled, if it is already running, so if you boot into the systemd system you can’t then switch init system. This is why the switch is best done at install time. If you’re too late, there are instructions for changing init system post-installation.
elogind
is a forked version of some of systemd’s user desktop session functionality. In practice modern desktop environments need this; without it, apt will want to remove things you probably want to keep. Even if you force it, you may find that your desktop environment can’t adjust the audio volume, etc.
ntp
is needed because nowadays the default network time client is systemd-timesyncd (which is a bad idea even on systems with systemd as init). We need to specify it because the package dependencies don’t automatically give you any replacement for systemd-timesyncd.
dbus-x11
is a glue component. In theory it ought to be installed automatically. However, there have been problems with the dependencies that meant that (for example) asking for emacs would try to switch the init system. Specifying dbus-x11
explicitly is a workaround for that, which I nowadays adopt out of caution. Perhaps it is no longer needed.
(On existing systems, it may be necessary to manually install orphan-sysvinit-scripts
, which exists as a suboptimal technical workaround for the sociopolitical problems of hostile package maintainers and Debian’s governance failures. The recipe above seems to install this package automatically.)
usrmerge
This recipe results in a system which has merged-/usr via symlinks. This configuration is a bad one. Ideally usrmerge-via-symlinks would be avoided.
The un-merged system is declared “not officially supported by Debian” and key packages try very hard to force it on users. However, merged-/usr-via-symlinks is full of bugs (mostly affecting package management) which are far too hard to fix (a project by some folks to try to do so has given up).
I suspect un-merged systems will suffer from fewer bugs in practice. But I don’t know how to persuade d-i to make one.
Installer images
I think there is room in the market for an unofficial installer image which installs without systemd and perhaps without usrmerge. I don’t have the effort for making such a thing myself.
Conclusion
Installing Debian without systemd is fairly straightforward.
Operating Debian without systemd is a pleasure and every time one of my friends has some systemd-induced lossage I get to feel smug.
no subject
(Anonymous) 2023-07-19 03:16 pm (UTC)(link)(Other than the fact that AFAIK devuan hasn't yet released a version tracking bookworm)
no subject
Good question.
Narrowly, in the particular case I had, Devuan Chimaera had some problems with hardware support on the laptop in question, so wasn't a good option.
But more broadly, I think the right question is "why use Devuan"? Since in general, if all things are equal, it's usually better to use an upstream distro rather than a derivative.
There are quite a few good reason to use Devuan. I touched on one of them in my post - Devuan doesn't have usrmerge. There are others. Devuan will be able to fix some issues more easily than Debian. As a Devuan user, you get to report bugs to Devuan (who are lovely people, but overworked) rather than Debian (where maintainers are sometimes openly hostile).
Since I'm very much a Debian insider, that hostility is something I already have to do deal with, and generally Debian's bullshit is something I can often readily navigate.
You mention "the work of keeping sysv-init". Of course much of that work has been done by Devuan folks but within Debian. This makes sense, since it's normally easier to change things upstream where possible. And it's why, indeed, Debian without systemd does work well.
Re: Installing Debian with sysvinit
(Anonymous) 2023-07-24 07:39 am (UTC)(link)Great post. OpenRC is also an interesting choice for an init which I have been running for some time now.Starting with bookworm GNOME actually work with sysvinit, tested just in a VM though. GNOME wayland has a bug though where no xserver is running. If you forcefully try to launch apps under X11 they never start. KDE worked flawless though.
Re: Installing Debian with sysvinit
ntpsec
(Anonymous) 2023-07-19 04:14 pm (UTC)(link)Re: ntpsec
So it has. Thanks.
ntp
is a transitional package. So these instructions work for bookworm but will need to be updated in the future. (I'm loathe to edit the post now without retesting it.)rsyslogd ?
(Anonymous) 2023-07-20 09:27 am (UTC)(link)I suppose the resulting system pulls rsyslogd with the changes... or does it remains without rsyslogd?
systemd-timesyncd considered harmful
(Anonymous) 2023-07-20 10:04 am (UTC)(link)can you expand or provide links about it?
Re: systemd-timesyncd considered harmful
no subject
(Anonymous) 2023-07-20 11:01 am (UTC)(link)