[systemd-devel] need some help understanding systemd-based initramfs

Lennart Poettering lennart at poettering.net
Mon Apr 29 13:03:43 UTC 2019


On Mo, 29.04.19 07:12, Ellis (contact at xogium.me) wrote:

> Hi,
> thank you once again. I guess I will have to find how to keep this directory
> as a whole as you said. Maybe I expected systemd to realize this on its own
> somehow, and it doesn't. Should a fstab entry be enough ? I'm guessing
> not... I can try to explore the code for dracut as well, but I'm really
> really bad at reading source code.

Normally, in the initrd you'd set up /sysroot as the new root to
transition to, and then you have two options:

1. manaully bind mount /run from the initrd into it
2. let systemd do it: it automatically detects whether /sysroot/run is
   a mount point, if not it will bind mount the host /run into it
   making it one.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list