Systemd 251 released with systemd-sysupdate introduced many other additions

Systemd 251 will be officially released this Saturday as the first feature update for this Linux init system for 2022.

As with most feature releases of systemd, systemd 251 is another vigorous release that continues to add new features to improve workflows and modernize other low-level areas of the Linux stack beyond its traditional init system duties.

Looking at the systemd git repository from v250 to v251, 79,853 lines of new code and 34,624 lines were deleted in the last six months. Systemd contains approximately 706,000 lines of recognized code, another 71,000 lines of comments, and 188,000 blank lines.

Key changes for systemd 251 include:

– Added a new component “systemd-sysupdate” which automatically detects/downloads/installs A/B style updates for the host installation itself or container images/portable service images. Systemd-sysupdate is currently considered experimental. Red Hat/systemd developers have been working on this OS update tool since last summer.

– Systemd 251 changes the default C standard version to C11 with GNU extensions (GNU11), although their public API headers are still limited to C89.

– All kernels supported by systemd now merge the RdRand instruction output (or other random ISA extensions of the CPU) into the entropy pool at early boot. This means that even if /dev/urandom is not initialized, it will still return bytes that were of at least as high quality as RdRand. Systemd, on the other hand, no longer has to call RdRand directly itself. systemd’s use of RdRand has historically been prone to bugs.

– Various bootloader specification improvements and various kernel installation improvements.

– A new set of service monitor environment variables are passed to the OnFailure/OnSuccess handlers.

– Units killed by systemd-oomd now have a service result of oom-kill.

– Enabled more service settings to now also work with non-privileged user services.

– busctl now uses pcapng format for output instead of pcap.

– New hardware database files (HWDB) for handheld devices and A/V production devices.

– systemd-networkd .netdev files can now be used to create virtual WiFi devices.

– PID 1 now automatically fetches system credentials from QEMU’s fw_cfg interface. This allows arbitrary data to be spawned into VM systems, similar to what is currently possible with systemd-nspawn containers. Initially, the kernel command line “systemd.set_credential=” is the expected use case when paired with VMs using the UEFI stub systemd-stub.

– The LoadCredential= option now automatically searches for credentials for importing in the directories /etc/credstore/, /run/credstore/, /usr/lib/credstore/ if no or a relative source filename is passed. From the docs: “The idea is that these directories are now the recommended system-wide location to put credentials for automatic pickup by services.”

– Several environment variables are now added to generators called from PID 1: $SYSTEMD_SCOPE, $SYSTEMD_IN_INITRD, $SYSTEMD_ARCHITECTURE, $SYSTEMD_FIRST_BOOT and $SYSTEMD_VIRTUALIZATION.

– Block devices now get a new set of device symbolic links in /dev/disk/by-diskseq/[nr], which can be used to reference block device nodes via the kernel diskseq value. This relates to the change for systemd introduced in Linux 5.15 and was also addressed by Microsoft engineers for a global block/disk change counter.

– The systemd-creds tool now has a “has-tpm2” verb to indicate if a working TPM 2.0 module is available.

The systemd sources and the long list of systemd 251 changes overall can be found on GitHub.

About Willie Ash

Check Also

Ubuntu running on a Google Nest Hub, wait a minute?

I just discovered a story about Ubuntu running on a Google Nest Hub (2nd gen). …