|
|
Log in / Subscribe / Register

Systemd and containers

Systemd and containers

Posted Jun 11, 2015 18:00 UTC (Thu) by raven667 (subscriber, #5198)
In reply to: Systemd and containers by xtifr
Parent article: Systemd and containers

Everything that is needed to complete the first stage of booting, such as mount and fsck and a shell, needs to go in the initial ramdisk and get loaded by the firmware/bootloader if you are going to have the flexibility to support all the different ways that a root filesystem can be mounted (iSCSI, NFS, LVM, encrypted, SCSI, SATA, USB, or a combination with loadable kernel modules, etc.) or have the tools to fix a broken filesystem. The firmware already has to be capable of loading the kernel image from somewhere, by re-using this mechanism to get all the modules and boot strapping tools, you aren't taking on any additional complexity or risk which makes the system more robust.

So the best technical mechanism to accomplish the goals you describe, of having a separate, simpler, bootstrapping system, is to put everything in the ramdisk that the firmware can load without needing the OS to be at all functional. Once you've put the bootstrapping tools in the ramdisk the seperation of /bin vs. /usr/bin no longer serves any function so you can reduce complexity by putting everything in /usr/, once you've put everything in /usr you have one clean hierarchy where all the executable code lives, that can be mounted seperately if you wish without the possibility of breakage. It's the clean seperation of configuration and mutable data from code which makes containers and stateless systems workable without getting buried under the kludgy hacks that swamped previous iterations of this idea.


The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:

Note: you can avoid this step in the future by logging into your LWN account.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds