[systemd-devel] Minimal systemd configuration

Alison Chaiken alison at she-devel.com
Sun Apr 5 16:04:19 PDT 2015


srdb asks:
> 1. Is there any documentation for creating minimal systemd
> configuration? I mean for example - for qemu or embedded systems - with
> only sshd daemon running and console to just log into the system?

Yes, at

http://freedesktop.org/wiki/Software/systemd/MinimalBuilds/

The easiest way to get a minimal build is to clone the source, run
autogen.sh, then read the --disable entries in the configure script
that is created.  To get a minimal build with 219, I ran

./configure --disable-gtk-doc --disable-seccomp --disable-selinux
--disable-apparmor --disable-xz --disable-zlib --disable-pam
--disable-acl --disable-smack --disable-gcrypt --disable-audit
--disable-elfutils --disable-libcryptsetup --disable-qrencode
--disable-microhttpd --disable-gnutls --disable-libcurl
--disable-libidn  --disable-quotacheck --disable-vconsole
--disable-logind --disable-machined --disable-importd
--disable-hostnamed --disable-timedated --disable-localed
--disable-polkit --disable-resolved --disable-networkd --disable-efi
--disable-manpages --disable-hibernate --disable-tests  --disable-nls
--disable-python-devel --disable-utmp --disable-xkbcommon
--disable-ima --disable-binfmt --disable-tmpfiles --disable-sysusers
--disable-firstboot --disable-randomseed

You may need different options in your setup.   Edit the configuration
script or use a command-line option to set the installation directory
to your NFS path.   If, for some reason, you don't want systemd-219,
you can checkout an earlier tagged release from git.

> 3. Is it possible to reconfigure systemd to run some script at the end
> of initialisation?

Yes, you can add a new service by creating a new unit file in
multi-user.target (more or less old runlevel 3) or graphical.target
(more or less old runlevel 5).   Find a unit file that does something
similar to what you want and use it is a template.

Good luck,
Alison

-- 
Alison Chaiken                           alison at she-devel.com
650-279-5600
http://{she-devel.com,exerciseforthereader.org}
One consumes a great deal of silence in the course of becoming
educated. -- Matthew B. Crawford


More information about the systemd-devel mailing list