Systemd

Version: 

Section: 

System

On this page:

MX Linux ships with systemd present but disabled by default. The MX Linux team strongly urges users to remain with this configuration which uses sysvinit instead. This page simply provides information for those interested in the question.

Background

(thanks to Timkb4cq on MX Forum)

Systemd is an init & service manager, largely written by the developers of pulseaudio & udev.
It is more integrated than prior init systems, and can better do parallel operations during startup.
Its service manager and dbus implementation are integrated in the init system, so they all run under PID1 (the first program ID)

Obviously there are strong disagreements whether this is a good idea or not. Traditionally the init program running under PID1 was as small as possible so there was less that could go wrong which made your system unbootable. Also configuration files & log files from these processes were fairly simple text files for ease of troubleshooting. Systemd violates these traditions. Logs are binary files by default. Boot dependencies are taken care automatically instead of manually in config files.
Arguably it adds functionality e.g. in better control of the state of services, and faster boot times because of the dependency optimization.

But in any system things *will* go wrong sooner or later. The more complex the system the more likely it is to happen. And when systemd does go wrong, troubleshooting & repair is more difficult.

The systemd argument is largely an argument about the Unix philosophy:

Write programs that do one thing and do it well.
Write programs to work together.
Write programs to handle text streams, because that is a universal interface.

Systemd doesn't follow that philosophy very well.

In another way it's an automatic transmission vs stick shift argument. Do you want full control of your system? Sysadmins are far more likely to notice the drawbacks than the average desktop user. To be fair, systemd is good enough for most users and it's actively maintained which is no longer the case with sysvinit. OTOH, sysvinit has had a *long* time to weed out the bugs so one wouldn't expect it to need a lot of maintenance.

Finally, which init system to use is by no means an open and shut case for many people. MX LInux follows the lead of anticapitalista, Bitjam, and the rest of the antiX dev team.

Enabling systemd

NOTE: this procedure can only be carried out with an installed version of MX Linux: it will not work in a Live Session.

The following basic procedure was developed on an upgraded clean install of MX-16 x64 on an Acer Aspire One 722. It is intended as a starting point only. The user will end with MX Linux using systemd but with no guarantee about its degree of functionality. This is especially true if it is carried out on a system that has been used for some time, about which there is no information at this time.

Basic steps:

  1. in root terminal: apt-get update && apt-get upgrade
  2. reboot
  3. when the GRUB screen comes up, click on Advanced options..., then arrow down and select the systemd version.
  4. F10 to boot
  5. in Step 6, the purge of those packages will take Network Manager with it, and you may not have internet access afterwards. If using a wired connection, that will likely continue. But wireless will be lost, so either connect beforehand an ethernet cable if possible, or install another network application. For example, in root terminal: apt-get install wicd-gtk.
  6. still in root terminal: apt-get purge systemd-shim sysvinit
  7. launch wicd to restore network connection if it has been lost.
  8. reinstall removed packages in root terminal: apt-get install policykit-1-gnome hplip gvfs gvfs-backends gvfs-fuse live-usb-maker-gui grub-customizer mx-apps gufw network-manager network-manager-gnome network-manager-openconnect
  9. still in root terminal: apt-get purge wicd-gtk
  10. reboot

Terminal output during purge step above:

--------------

$ sudo apt-get purge systemd-shim sysvinit -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-javascriptcoregtk-3.0 gir1.2-soup-2.4 gir1.2-webkit-3.0 libndp0 libnl-route-3-200 libnm0 libteamdctl0
python-netifaces
Use 'apt-get autoremove' to remove them.
systemd-sysv
The following packages will be REMOVED:
colord* grub-customizer* gufw* gvfs* gvfs-backends* gvfs-daemons* gvfs-fuse* hplip* libpam-systemd*
live-usb-maker-gui* mx-apps* network-manager* network-manager-gnome* network-manager-openconnect* policykit-1*
policykit-1-gnome* printer-driver-postscript-hp* systemd-shim* sysvinit* sysvinit-core* udisks2*
The following NEW packages will be installed:
systemd-sysv
0 upgraded, 1 newly installed, 21 to remove and 0 not upgraded.
Need to get 36.3 kB of archives.
After this operation, 39.6 MB disk space will be freed.
Get:1 http://ftp.us.debian.org/debian/ jessie/main systemd-sysv amd64 215-17+deb8u6 [36.3 kB]
Fetched 36.3 kB in 0s (183 kB/s)
(Reading database ... 184524 files and directories currently installed.)
Removing colord (1.2.1-1+b2) ...
Purging configuration files for colord (1.2.1-1+b2) ...
Removing grub-customizer (5.0.6-1mx150+1) ...
Removing gufw (1:16.04.1-0mx150+1) ...
Purging configuration files for gufw (1:16.04.1-0mx150+1) ...
Removing gvfs-fuse (1.22.2-1) ...
Removing gvfs-backends (1.22.2-1) ...
Removing gvfs:amd64 (1.22.2-1) ...
Removing gvfs-daemons (1.22.2-1) ...
Removing printer-driver-postscript-hp (3.16.10+repack0-1mx15+1) ...
Removing hplip (3.16.10+repack0-1mx15+1) ...
Purging configuration files for hplip (3.16.10+repack0-1mx15+1) ...
Removing network-manager-gnome (1.0.8-1mx150+1) ...
Purging configuration files for network-manager-gnome (1.0.8-1mx150+1) ...
Removing network-manager-openconnect (0.9.10.0-1) ...
Purging configuration files for network-manager-openconnect (0.9.10.0-1) ...
Removing network-manager (1.0.8-1mx150+1) ...
Purging configuration files for network-manager (1.0.8-1mx150+1) ...
dpkg: warning: while removing network-manager, directory '/etc/NetworkManager/system-connections' not empty so not removed
Removing mx-apps (16.11.01) ...
Removing live-usb-maker-gui (0.1.3) ...
Removing udisks2 (2.1.3-5) ...
Purging configuration files for udisks2 (2.1.3-5) ...
Removing policykit-1-gnome (0.105-2) ...
Purging configuration files for policykit-1-gnome (0.105-2) ...
Removing policykit-1 (0.105-15~deb8u2) ...
Purging configuration files for policykit-1 (0.105-15~deb8u2) ...
Removing sysvinit (2.88dsf-59) ...
Removing libpam-systemd:amd64 (215-17+deb8u6) ...
Removing systemd-shim (9-1) ...
Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim'
Purging configuration files for systemd-shim (9-1) ...
No diversion 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim', none removed.
dpkg: sysvinit-core: dependency problems, but removing anyway as you requested:
init depends on systemd-sysv | sysvinit-core | upstart; however:
Package systemd-sysv is not installed.
Package sysvinit-core is to be removed.
Package upstart is not installed.

Removing sysvinit-core (2.88dsf-59) ...
Purging configuration files for sysvinit-core (2.88dsf-59) ...
Processing triggers for libglib2.0-0:amd64 (2.42.1-1+b1) ...
Processing triggers for man-db (2.7.0.2-5) ...
Processing triggers for dbus (1.8.22-0+deb8u1) ...
Processing triggers for desktop-file-utils (0.22-1) ...
Processing triggers for mime-support (3.58) ...
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for cups (1.7.5-11+deb8u1) ...
Selecting previously unselected package systemd-sysv.
(Reading database ... 183225 files and directories currently installed.)
Preparing to unpack .../systemd-sysv_215-17+deb8u6_amd64.deb ...
Unpacking systemd-sysv (215-17+deb8u6) ...
Processing triggers for man-db (2.7.0.2-5) ...
Setting up systemd-sysv (215-17+deb8u6) ...

--------------------

Known issues

  • MX Tools generally work, but a few problems exist
    • USB Unmouter shows on first boot on desktop, not Notification Area; may move to correct location after rebooting and updating/upgrading
    • Check Apt GPG only recognizes the Debian repo at first; seems to correct itself after rebooting and updating/upgrading
  • Printer installation fails because CUPS fails to connect.
  • Installing Skype causes multiple problems with the desktop.

Links

v. 201701018

Language: 

English