[systemd-devel] need some help understanding systemd-based initramfs
Ellis
contact at xogium.me
Mon Apr 29 15:06:49 UTC 2019
Hi,
after some manual testing on my end, I can confirm two things:
1. systemd really takes care of /run as it should
and 2. I still have no log prior to 'received sigterm from PID 1' when
the real root is booted up.
I intentionally messed up my kernel cmdline giving it a wrong rootfs
partition, was dropped into emergency mode, created a directory named
testing in /run, mounted the right filesystem for /sysroot, typed exit,
booted up to real root, /run/testing is still there.
However I noticed that /run/log was empty, both in the initrd and in the
real root.
So, I'm even more confused.
Thanks for the help, really appreciate it
Lennart Poettering a écrit :
> 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