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

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Mon Aug 8 12:54:30 UTC 2022


>>> "Ulrich Windl" <Ulrich.Windl at rz.uni-regensburg.de> schrieb am 08.08.2022
um
14:50 in Nachricht <62F10690020000A10004C316 at gwsmtp.uni-regensburg.de>:
>>>> Patrick Schleizer <patrick‑mailinglists at whonix.org> schrieb am 08.08.2022
um
> 14:24 in Nachricht <7abb7852‑c097‑34d6‑c4ea‑f2101fc5d327 at whonix.org>:
>> Hi!
>> 
>> This is what I think but please correct me if I am wrong.
>> 
>> 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"

> 
>> 
>> 5. /lib/systemd/system‑shutdown runs scripts in the
>> /usr/lib/systemd/system‑shutdown/ folder
>> 
>> 6. /lib/systemd/system‑shutdown performs further cleanup (similar to
>> dracut, probably some functionality duplicated with dracut, includes
>> kill all remaining processes, unmount the root risk) and eventually
>> halt/reboot/poweroff/kexec.
>> 
>> Cheers,
>> Patrick





More information about the systemd-devel mailing list