[systemd-devel] Persist mount from initramfs with systemd.volatile boot
Andrei Borzenkov
arvidjaar at gmail.com
Sun Nov 10 06:32:19 UTC 2024
10.11.2024 02:42, serenissi wrote:
> I have an use case that requires persisting a mount (/sysroot/mnt) from
> initramfs. The system is booted with systemd.volatile, so only /usr of
> /sysroot is used, rest is tmpfs.
>
> Ideally I should add the mount unit in the /usr itself but /usr is a
> read only signed fs that I can't modify for reasons. I can arbitrarily
> change initramfs though. As it is an ephemerous system, there isn't any
> other place.
>
>
> Is it somehow possible? I couldn't think of a way surviving the
> pivot_root for volatile.
>
Did you try to mount it in initrd on /sysroot/mnt? It needs to be after
systemd-volatile-roor.service.
More information about the systemd-devel
mailing list