Debian Bookworm with Mate and the shepherd init system
Shepherd? Never heard of that!
shepherd is the init system for guix. It has a lot of drawbacks for the average Debian user:
- It is not in an official Debian package, you have to install it yourself
- 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
- It is written in a Lisp like language called guile, which is not mainstream at all
So why bother using it? Several reasons:
- You may have noticed when reading other pages on this site that I don't like what systemd has become
- And keeping sysvinit is not attractive either
- No breaking features to be seen in other init systems worth testing them
- shepherd by contrary is an exotic beast a hacker can only be tempted to consider
- 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 touch your existing init system: you have to add "init=/bin/shepherd" to boot with shepherd and you will have to use alternate command to reboot/halt/poweroff (see README file in shepherd-debian package).
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-1.0.0rc1
This is the real init engine. The packages are below:
amd64:
shepherd 1.0.0rc1-0.1 amd64.deb
shepherd 1.0.0rc1-0.1 amd64.build shepherd 1.0.0rc1-0.1 amd64.changes shepherd 1.0.0rc1-0.1 amd64.buildinfo
armhf:
shepherd 1.0.0rc1-0.1 armhf.deb
shepherd 1.0.0rc1-0.1 armhf.build shepherd 1.0.0rc1-0.1 armhf.changes shepherd 1.0.0rc1-0.1 armhf.buildinfo
Source:
shepherd 1.0.0rc1-0.1.dsc shepherd 1.0.0rc1-0.1.debian.tar.xz shepherd 1.0.0rc1.orig.tar.gz
And you install with:
dpkg -i shepherd_1.0.0rc1-0.1_amd64.deb
Installing shepherd-debian-1.5
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
- fake-hwclock
This should be enough for a basic server or desktop. List of packages:
amd64:
shepherd-debian 1.5-2 amd64.deb
shepherd-debian 1.5-2 amd64.build shepherd-debian 1.5-2 amd64.changes shepherd-debian 1.5-2 amd64.buildinfo
armhf:
shepherd-debian 1.5-2 armhf.deb
shepherd-debian 1.5-2 armhf.build shepherd-debian 1.5-2 armhf.changes shepherd-debian 1.5-2 armhf.buildinfo
Source:
shepherd-debian 1.5-2.dsc shepherd-debian 1.5-2.debian.tar.xz shepherd-debian 1.5.orig.tar.gz
You install with:
dpkg -i shepherd-debian_1.5-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 informationn like how to reboot/halt/poweroff.
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