|
|
Subscribe / Log in / New account

Systemd and containers

Systemd and containers

Posted Jun 18, 2015 0:24 UTC (Thu) by cesarb (subscriber, #6266)
In reply to: Systemd and containers by nix
Parent article: Systemd and containers

> There is a limit: initial ramdisks are not swappable (unlike, say, tmpfs). (This is why they are generally cleaned out and thrown away when switching to the initial root, so as not to waste precious physical RAM).

I have seen code which switches root to the initramfs and runs a binary from there on shutdown. Wouldn't that mean that the initrd needs to be kept resident all the time?


to post comments

Systemd and containers

Posted Jun 18, 2015 8:38 UTC (Thu) by mchapman (subscriber, #66589) [Link]

> I have seen code which switches root to the initramfs and runs a binary from there on shutdown. Wouldn't that mean that the initrd needs to be kept resident all the time?

No, the initramfs can be repopulated upon shutdown.

For example, with Dracut this is done by dracut-shutdown.service, which is pulled in by systemd's shutdown.target unit. See https://www.kernel.org/pub/linux/utils/boot/dracut/dracut... for details.


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