[systemd-devel] Exploring Minimal Systemd in Initramfs for Faster Boot
Lennart Poettering
lennart at poettering.net
Mon Sep 30 08:31:06 UTC 2024
On Di, 24.09.24 15:26, Mantas Mikulėnas (grawity at gmail.com) wrote:
> On Mon, Sep 23, 2024 at 12:33 PM <Dharma.B at microchip.com> wrote:
>
> > Hi Team,
> >
> > I'm exploring the possibility of splitting the systemd binary to
> > optimize boot time before and after switching to the root filesystem.
> >
> > I’m aware that the systemd binary is quite large and may not fit in the
> > initramfs, but is it feasible to have a minimal version of systemd that
> > can invoke essential services and continue tracking them after
> > transitioning to the main root filesystem?
> >
>
> Unless I missed any recent changes, transitioning to the main root
> filesystem always involves launching the main systemd executable anew from
> rootfs (even if the initramfs was already running systemd). It's fine if a
> minimal initramfs-systemd execs a larger rootfs-systemd during the
> transition as long as their versions are compatible – though I am not sure
> if there is actually any state handed over between them in the first
> place;
Yes, we hand over quite a bit of state, to keep track of all cgroups
that might still be there.
> IIRC normally none of the initramfs services are expected to survive the
> transition.
Yes, that's the recommendation.
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list