July 26th, 2024

BusyBox: Life Without Systemd (2018)

The article details configuring a Fedora machine to use BusyBox's runit instead of systemd, including service management, network setup, and improvements for user-friendly logging and service dependencies.

Read original articleLink Icon
BusyBox: Life Without Systemd (2018)

The article discusses the process of using BusyBox's runit applets to manage services on a Fedora machine, specifically in a scenario where systemd is replaced. The author outlines the steps taken to configure the system, including creating a service directory, adjusting service scripts, and managing network interfaces. The setup involves creating a user for logging, configuring a service to start runit, and modifying systemd's default target to boot into a text-based environment instead of a graphical one.

The author successfully tests the network services and local DNS caching, then proceeds to set up a graphical login manager (lightdm) that can be activated from a terminal. The article emphasizes the need for additional tools, such as a file-waiting utility and improved service management scripts. The final goal is to create a system that can boot without systemd by implementing dbus and udevd services and writing init scripts.

The author notes several areas for improvement, including the need for a more robust "need" tool, better handling of service dependencies, and user-friendly log viewing tools. The article concludes with a reflection on the successful transition to a system managed by runit, highlighting the potential for further enhancements in service management and logging.

Related

Systemd Looks to Replace sudo with run0

Systemd Looks to Replace sudo with run0

Systemd introduces "run0" to replace sudo in Linux. It offers secure user elevation without SUID, using a service manager for command execution. Creator Poettering aims for enhanced security and usability. Systemd 256 with run0 is on GitHub for testing.

The FreeBSD-native-ish home lab and network

The FreeBSD-native-ish home lab and network

The author details a complex home lab setup with a FreeBSD server on a laptop, utilizing Jails for services like WordPress and emphasizing security measures and network configurations for efficiency and functionality.

Lennart Poettering: Fitting Everything Together

Lennart Poettering: Fitting Everything Together

The blog post explores integrating systemd components for Linux OS development, emphasizing hermetic /usr/ design, image-based OS with security features, self-updating systems, and community-driven desktop OS with advanced security measures.

Systemd Talks Up Automatic Boot Assessment in Light of the CrowdStrike Outage

Systemd Talks Up Automatic Boot Assessment in Light of the CrowdStrike Outage

In response to the CrowdStrike-Microsoft outage, systemd's lead developer, Lennart Poettering, promotes systemd's Automatic Boot Assessment for Linux systems. Despite its support, major distributions have not adopted it. Poettering stresses the importance of implementing such features for system security and recovery.

Dhcpcd replacing dhclient for Debian Trixie or perhaps networkd?

Dhcpcd replacing dhclient for Debian Trixie or perhaps networkd?

ISC's dhclient is being replaced by dhcpcd in Debian for stability. Debate on network configuration tools for Trixie favors networkd for IPv4 but raises privacy concerns and inefficiencies with default IPv6 settings. Networkd is criticized for IPv6 and dual-stack setups, lacking privacy emphasis.

Link Icon 12 comments
By @dark-star - 9 months
So... you can remove systemd and replace it with a few shell scripts? Isn't this, like, pretty well-known?

Or maybe I didn't get the point of this. It doesn't look to me like this is one of the regular rants against how systemd destroys everything. But I could be wrong about that?

By @mgaunard - 9 months
One thing I found interesting recently while working with cloud instances (I usually work with traditional datacenters), is that those things boot extremely slowly.

The whole point of those new complex init systems was to boot faster. It definitely works for my desktop or laptop, but apparently not so much with the cloud.

If it's not gonna boot fast, I don't see the point of replacing straightforward shell scripts.

By @sylware - 9 months
I use busybox with a minimal init process, _REALLY_ minimal, which is beyond enough for a desktop.

Minimal init is super stable in time, rock solid, code is close to zero, aka near 0 maintenance, doing a good enough job.

But, GNU with some of its minions is waging war on busybox: for instance the steam client is not distributing a static ELF64 of bash (and it could easily), but does distribute _mandatory_ bash and not sh scripts, and those scripts are carefull of using GNU command only niche options... but the main steam client binary seems about to kill those script abominations... hopefully... but that steam client binary is a ELF32 binary expecting x11/GL... oooh god... (it should be a super clean ELF64 binary: only glibc libs in NEEDED entries with a 2017-2019 manual ABI selection, dynamically loading system interface sharde libs, and without too brain damaged or recent ELF relocations (aka serious professional elf/linux binary crafting).

By @immibis - 9 months
I use runit to manage various service groups for projects (e.g. last week, everything I was running at Bornhack camp). It simply does what it needs to do. It can be used in any context and doesn't need to take over the system. I recommend trying it out, especially if you think the complexity of systemd is needed.
By @nona - 9 months
I've seen quite a bit of systemd-free embedded distributions (like OpenWrt et al).

But I'd like to see more general-purpose embedded-focused distribution with systemd. The only ones I know about are the special-purpose LibreELEC/Jelos/Rocknix/Lakka variants.

It'd be nice to see such a distribution, but with proper package management. I was hoping https://distr1.org/ would become this, but it seems like it's been more or less abandoned.

By @bryango - 9 months
By @trte9343r4 - 9 months
Compiling mininal version of systemd init and systemctl is not that hard. Static with musl libc.

In 2024 it is not worth to deal with alternative init systems.