3 ms·
Yea, the real goal here is to be able to mount the whole OS in one operation. To that end, /dev is now autopopulated by udev and you can even leave /etc complet
by db48x 4y ago
Yea, the real goal here is to be able to mount the whole OS in one operation. To that end, /dev is now autopopulated by udev and you can even leave /etc completely empty. The goal is for everything to have good enough defaults that having a config file in /etc is unimportant unless the admin wants to override something. Probably the only things in there when you install a new system would be the root password in /etc/shadow and your user and group information in /etc/passwd and /etc/group.
It should make a lot of tasks a lot easier. The one I like most is trivially setting up containers or VMs that have your base OS in them plus some new software that you are testing. For example, at work we use Debian with a bunch of extra packages installed, plus our own package containing all manner of software and configuration that we’ve written. Although we do a fair amount of unit testing, and the Rust compiler really has our back, it is very difficult to really test things outside of production. Currently we have to painstakingly set up a test environment on a production machine, using tricks like altering our PATH so that the test version of the tools we are working on will be called, or editing things so that they call the version under test instead. It’s doable but laborious.
If we were using Fedora instead of Debian, we would be able to use systemd-nspawn to spawn a container with the existing OS, read–only mounts containing our databases and other large datasets, and an overlayfs to redirect any writes to those file systems to an alternate location. Installing and running our software inside that container would work exactly as if we were in production, and testing everything would be so much simpler.
systemd-nspawn is available on Debian, but running it requires keeping extra copies of the OS for each container you want to spawn, so we haven’t actually gotten around to doing it yet. Oh, and each container needs a properly set up /etc directory. We can’t just leave it empty, and we can’t just blindly copy the host’s either.