%general-entities; ]> $LastChangedBy$ $Date$ Systemd-&lfs-systemd-version; systemd Introduction to systemd Even though systemd was installed while building LFS, there are many features provided by the package that were not included in the initial installation due to unmet dependencies. The systemd package needs to be rebuilt to provide a working systemd-logind service, among many others. &lfs79_checked;&gcc6_checked; Package Information Systemd Download (HTTP): systemd Dependencies Required Recommended Runtime Dependency Optional , , , , , , , , or , , , cryptsetup, gnu-efi, kexec-tools, libmicrohttpd, libseccomp, lxml (Python Module), lz4, qrencode, quota-tools and Sphinx In order to build the systemd Python module, lxml package needs to be installed for the corresponding Python version (2 or 3). Note that configure defaults to Python 2. In order to build the module for Python 3, make sure you pass the PYTHON=python3 environment variable to the configure command below. Optional (to rebuild the manual pages) , and User Notes: Installation of systemd First, fix a potential security issue with framebuffer devices: sed -e 's@DRI and frame buffer@DRI@' \ -e '/SUBSYTEM==\"graphics\", KERNEL==\"fb\*\"/d' \ -i src/login/70-uaccess.rules Disable two tests that always fail: sed -e 's:test/udev-test.pl ::g' \ -e 's:test-copy$(EXEEXT) ::g' \ -i Makefile.in Rebuild systemd by running the following commands: cc_cv_CFLAGS__flto=no \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --with-rootprefix= \ --with-rootlibdir=/lib \ --enable-split-usr \ --disable-firstboot \ --disable-ldconfig \ --disable-sysusers \ --without-python \ --with-default-dnssec=no \ --docdir=/usr/share/doc/systemd-&lfs-systemd-version; && make For the best results, make sure you run the testsuite from a system that is booted by the same systemd version you are rebuilding. To test the results, issue: make -k check. Installing the package will override all files installed by systemd in LFS. It is critical that nothing uses either systemd or Udev libraries or programs during the installation phrase. Best way to achieve that is to do the installation in the rescue mode. To switch to the rescue mode, issue the following command as the root user from a TTY: systemctl start rescue.target Now, as the root user: make install Move NSS libraries to /lib by running the following command as the root user: mv -v /usr/lib/libnss_{myhostname,mymachines,resolve}.so.2 /lib Remove an unnecessary directory by running the following command as the root user: rm -rfv /usr/lib/rpm Configuring systemd The /etc/pam.d/system-sesion file needs to be modified and a new file needs to be created in order for systemd-logind to work correctly. To accomplish that, run the following commands as the root user: cat >> /etc/pam.d/system-session << "EOF" # Begin Systemd addition session required pam_loginuid.so session optional pam_systemd.so # End Systemd addition EOF cat > /etc/pam.d/systemd-user << "EOF" # Begin /etc/pam.d/systemd-user account required pam_access.so account include system-account session required pam_env.so session required pam_limits.so session include system-session auth required pam_deny.so password required pam_deny.so # End /etc/pam.d/systemd-user EOF At this point, you should reload the systemd daemon, and reenter multi-user mode with the following commands as the root user: systemctl daemon-reload systemctl start multi-user.target If upgrading from a previous version of systemd and you use an initrd, the system will hang during boot if you do not generate a new initrd with systemd-root-device.target included. Contents A list of the installed files, along with their short descriptions can be found at . Below are listed newly installed libraries and directories along with short descriptions. Installed Programs Installed Libraries Installed Directories None pam_systemd.so (in /lib/security) None Short Descriptions pam_systemd.so is a PAM module used to register user sessions with the systemd login manager, systemd-logind. pam_systemd.so