# Debian Bookworm with Mate and the shepherd init system ## Shepherd? Never heard of that! [shepherd](https://www.gnu.org/software/shepherd/) is the init system for [guix](https://guix.gnu.org/). It has a lot of drawbacks for the average Debian user: 1. It is not in an official Debian package, you have to install it yourself 2. Following 1., package maintainers don't include in them the equivalent of an init script or systemd service, so writing these is on your own 3. It is written in a Lisp like language called [guile](https://www.gnu.org/software/guile/), which is not mainstream at all So why bother using it? Several reasons: 1. You may have noticed when reading other pages on this site that I don't like what systemd has become 2. And keeping sysvinit is not attractive either 3. No breaking features to be seen in other init systems worth testing them 4. shepherd by contrary is an exotic beast a hacker can only be tempted to consider 5. I was a guile contributor a long time ago, so the language is not a barrier at all When Covid lockdown happened, I had a lot of free time, so I bite the bullet and went on implementing shepherd for Debian, to the point that shepherd runs now on my main hosts. Below is the result of that work. ## Installing shepherd on Debian Bookworm The following instructions are safe, they won't delete your existing init system, just renaming some binaries like /sbin/{halt,reboot,poweroff}, see below. ### Installing guile-3.0 Bookworm packages guile-3.0.8. This will work, but I offer more recent version, guile-3.0.9. Below are the corresponding Debian packages: amd64: [[guile-3.0-libs_3.0.9-0bu1_amd64.deb]] [[guile-3.0-dev_3.0.9-0bu1_amd64.deb]] [[guile-3.0_3.0.9-0bu1_amd64.deb]] [[guile-3.0_3.0.9-0bu1_amd64.build]] [[guile-3.0_3.0.9-0bu1_amd64.changes]] [[guile-3.0_3.0.9-0bu1_amd64.buildinfo]] armhf: [[guile-3.0-libs_3.0.9-0bu1_armhf.deb]] [[guile-3.0-dev_3.0.9-0bu1_armhf.deb]] [[guile-3.0_3.0.9-0bu1_armhf.deb]] [[guile-3.0_3.0.9-0bu1_armhf.build]] [[guile-3.0_3.0.9-0bu1_armhf.changes]] [[guile-3.0_3.0.9-0bu1_armhf.buildinfo]] Source: [[guile-3.0_3.0.9-0bu1.dsc]] [[guile-3.0_3.0.9-0bu1.debian.tar.xz]] [[guile-3.0_3.0.9.orig.tar.gz]] And you just have to run: dpkg -i guile-3.0-libs_3.0.9-0bu1_amd64.deb guile-3.0-dev_3.0.9-0bu1_amd64.deb guile-3.0_3.0.9-0bu1_amd64.deb ### Installing guile-fibers-1.3.1 This is a thread library for guile, not yet packaged for Debian. Here are the corresponding packages: amd64: [[guile-fibers_1.3.1-1bu_amd64.deb]] [[fibers_1.3.1-1bu_amd64.build]] [[fibers_1.3.1-1bu_amd64.changes]] [[fibers_1.3.1-1bu_amd64.buildinfo]] armhf (some costly tests have been suppressed in that 2bu version, as they exceeded RAM on the compiling host): [[guile-fibers_1.3.1-2bu_armhf.deb]] [[fibers_1.3.1-2bu_armhf.build]] [[fibers_1.3.1-2bu_armhf.changes]] [[fibers_1.3.1-2bu_armhf.buildinfo]] Source: [[fibers_1.3.1-1bu.dsc]] [[fibers_1.3.1-1bu.debian.tar.xz]] [[fibers_1.3.1-2bu.dsc]] [[fibers_1.3.1-2bu.debian.tar.xz]] [[fibers_1.3.1.orig.tar.gz]] You install with: dpkg -i guile-fibers_1.3.1-1bu_amd64.deb ### Installing shepherd-0.10.2 This is the real init engine. Care has been taken with the Debian alternatives system to not clobber your original /sbin/halt, /sbin/reboot and /sbin/poweroff by renaming them as /sbin/halt.orig-init, /sbin/reboot.orig-init and /sbin/poweroff.orig-init. The packages are below: amd64: [[shepherd_0.10.2-0.1_amd64.deb]] [[shepherd_0.10.2-0.1_amd64.build]] [[shepherd_0.10.2-0.1_amd64.changes]] [[shepherd_0.10.2-0.1_amd64.buildinfo]] armhf: [[shepherd_0.10.2-0.1_armhf.deb]] [[shepherd_0.10.2-0.1_armhf.build]] [[shepherd_0.10.2-0.1_armhf.changes]] [[shepherd_0.10.2-0.1_armhf.buildinfo]] Source: [[shepherd_0.10.2-0.1.dsc]] [[shepherd_0.10.2-0.1.debian.tar.xz]] [[shepherd_0.10.2.orig.tar.gz]] And you install with: dpkg -i shepherd_0.10.2-0.1_amd64.deb ### Installing shepherd-debian-1.4 This package installs a set of the equivalent of init scripts or systemd services for shepherd. The list of packages whose daemons are currently handled is below: * rsyslog * util-linux * ntpsec * cron * anacron * openssh-server * fwknopd * unbound * nsd * ndppd * radvd * openvpn * cyrus-common * exim4-base * fetchmail * cups-daemon * apache2 * postgresql-common * mariadb * bucardo * dbus * lightdm * uuid-runtime * zoneminder * bluetooth * dhcpcd * NetworkManager This should be enough for a basic server or desktop. List of packages: amd64: [[shepherd-debian_1.4-2_amd64.deb]] [[shepherd-debian_1.4-2_amd64.build]] [[shepherd-debian_1.4-2_amd64.changes]] [[shepherd-debian_1.4-2_amd64.buildinfo]] armhf: [[shepherd-debian_1.4-2_armhf.deb]] [[shepherd-debian_1.4-2_armhf.build]] [[shepherd-debian_1.4-2_armhf.changes]] [[shepherd-debian_1.4-2_armhf.buildinfo]] Source: [[shepherd-debian_1.4-2.dsc]] [[shepherd-debian_1.4-2.debian.tar.xz]] [[shepherd-debian_1.4.orig.tar.gz]] You install with: dpkg -i shepherd-debian_1.4-2_amd64.deb In case of errors, install the missing dependencies and retry. ## Using shepherd The above steps won't change your init system at next reboot. To use shepherd as the new init system, you have to add/change the init kernel boot argument as "init=/bin/shepherd". But I recommend you first study the README in package shepherd-debian for other useful information. ## Using shepherd with Mate If you use Mate, you may want to use these packages, see in package shepherd-debian the file README.elogind and the patches: login1.patch and udisk2.patch. amd64: [[elogind_246.10-1debian2bu_amd64.deb]] [[libelogind0_246.10-1debian2bu_amd64.deb]] [[libpam-elogind_246.10-1debian2bu_amd64.deb]] [[elogind_246.10-1debian2bu_amd64.build]] [[elogind_246.10-1debian2bu_amd64.changes]] [[elogind_246.10-1debian2bu_amd64.buildinfo]] Source: [[elogind_246.10-1debian2bu.dsc]] [[elogind_246.10-1debian2bu.debian.tar.xz]] [[elogind_246.10.orig.tar.gz]] All 3 packages have to be installed: dpkg -i elogind_246.10-1debian2bu_amd64.deb libelogind0_246.10-1debian2bu_amd64.deb libpam-elogind_246.10-1debian2bu_amd64.deb