dracut.asc: document shutdown procedure
parent
0ae480dcbf
commit
1d22c670b0
20
dracut.asc
20
dracut.asc
|
@ -120,6 +120,26 @@ final cleanup tasks. On an initramfs, the initial root file system cannot be
|
||||||
rotated away. Instead, it is simply emptied and the final root file system
|
rotated away. Instead, it is simply emptied and the final root file system
|
||||||
mounted over the top.
|
mounted over the top.
|
||||||
|
|
||||||
|
== Dracut on shutdown
|
||||||
|
|
||||||
|
On a systemd driven system, the dracut initramfs is also used for the shutdown procedure.
|
||||||
|
|
||||||
|
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
|
||||||
|
* 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
|
||||||
|
|
||||||
|
This ensures, that all devices are disassembled and unmounted cleanly.
|
||||||
|
|
||||||
= User Manual
|
= User Manual
|
||||||
|
|
||||||
== Creating an initramfs Image
|
== Creating an initramfs Image
|
||||||
|
|
Loading…
Reference in New Issue