[systemd-devel] Antw: [systemd‑devel] Antw: [EXT] What is the shutdown sequence with systemd and dracut?

Lennart Poettering lennart at poettering.net
Mon Aug 15 09:28:23 UTC 2022


On Mo, 08.08.22 14:54, Ulrich Windl (Ulrich.Windl at rz.uni-regensburg.de) wrote:

> >> 1. systemd runs systemd units for systemd shutdown.target
> >>
> >> 2. /lib/systemd/system‑shutdown (shutdown.c) runs
> >>
> >> 3. /lib/systemd/system‑shutdown executes /run/initramfs/shutdown (which
> >> is dracut)
> >>
> >> 4. dracut shutdown.sh performs various cleanup tasks (such as kill all
> >> remaining processes and unmount root disk)
> >
> > If dracut unmounts the root disk, the following /usr and /lib mist the in
> > initrd, right?
>
> Sorry: s/mist the in/must be in the"

systemd-shutdown actually pivots the rootdir into the /run/initramfs
subdir, when invoking the initrd shutdown script. Thus at that point
all fs paths refer to subdirs below /run/initramfs.

Lennart

--
Lennart Poettering, Berlin


More information about the systemd-devel mailing list