[systemd-devel] Journald : from initialramfs to real root

Thomas HUMMEL thomas.hummel at pasteur.fr
Wed Feb 26 19:54:54 UTC 2025


On 2/26/25 8:42 PM, Mantas Mikulėnas wrote:

Thanks for your reply.


> `mount --bind /run /newroot/run` is one way to do it. Bind mounts let you
> have the same filesystem mounted at multiple places, effectively.

Oh yes! I didn't thought of bind mounts, only of regular mounts and I 
didn't how how to "name" the tmpfs source of the mount

> Reading from /proc/kmsg only "consumes" the buffer for /proc/kmsg, not for
> other interfaces (i.e. not for /dev/kmsg and not for the syscall).

Ok. That's the info I was missing. I thought the actual buffer was 
cleared of read data because I thought reading from /proc/kmsg was the 
same as calling syslog with SYSLOG_ACTION_READ command under the hood 
and man states:

"Bytes read from the log disappear from the log buffer"

Actually reading rsyslogd source, it seems to just read from an fd it 
got from openening /proc/kmsg

Thanks

-- 
Thomas HUMMEL
HPC Group
Institut PASTEUR
Paris, FRANCE


More information about the systemd-devel mailing list