From c00ecb2892f783ed18c2f62772665d86ea66a252 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 26 Aug 2024 12:33:12 +0200 Subject: Merging upstream version 103. Signed-off-by: Daniel Baumann --- .../98dracut-systemd/dracut-shutdown.service.8.asc | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'modules.d/98dracut-systemd/dracut-shutdown.service.8.asc') diff --git a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc index 21ec88c..1e9f88c 100644 --- a/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc +++ b/modules.d/98dracut-systemd/dracut-shutdown.service.8.asc @@ -20,15 +20,20 @@ can be safely unmounted. The following steps are executed during a shutdown: -* systemd switches to the shutdown.target -* systemd starts /lib/systemd/system/shutdown.target.wants/dracut-shutdown.service -* dracut-shutdown.service executes /usr/lib/dracut/dracut-initramfs-restore which unpacks the initramfs to /run/initramfs -* systemd finishes shutdown.target +* The system starts to shut down +* ``$prefix/lib/systemd/system/sysinit.target.wants/dracut-shutdown.service`` + gets its ``ExecStop`` target triggered. +* ``dracut-shutdown.service`` executes + ``/usr/lib/dracut/dracut-initramfs-restore`` which unpacks the initramfs to + ``/run/initramfs`` * systemd kills all processes * systemd tries to unmount everything and mounts the remaining read-only -* systemd checks, if there is a /run/initramfs/shutdown executable -* if yes, it does a pivot_root to /run/initramfs and executes ./shutdown. The old root is then mounted on /oldroot. /usr/lib/dracut/modules.d/99shutdown/shutdown.sh is the shutdown executable. -* shutdown will try to umount every /oldroot mount and calls the various shutdown hooks from the dracut modules +* systemd checks if there is a ``/run/initramfs/shutdown`` executable +* if yes, it does a pivot_root to ``/run/initramfs`` and executes ``./shutdown``. + The old root is then mounted on ``/oldroot``. + ``/usr/lib/dracut/modules.d/99shutdown/shutdown.sh`` is the shutdown executable. +* shutdown will try to unmount every ``/oldroot`` mount and calls the various + shutdown hooks from the dracut modules This ensures, that all devices are disassembled and unmounted cleanly. -- cgit v1.2.3