Add a plymouth-switch-root-initramfs.service, which will call "plymouth update-root-fs --new-root-dir=/run/initramfs" to switch back to the initramfs (when applicable). Systemd will run this service before plymouthd receives the SIGTERM on shutdown, so this will cause the plymouthd-fd-escrow helper to run from the initramfs. This avoids the plymouthd-fd-escrow helper keeping the rootfs busy. Changes by Hans de Goede: - Fix a couple of typos - Add Conflicts=dracut-shutdown.service to plymouth-switch-root-initramfs.service dracut-shutdown.service restores the initramfs when it is _stopped_ use Conflicts to make sure its ExecStop has run before we do - Add a check for switching back to the initramfs to on_newroot () and dump the debug-buffer before the switch (while we still have access to /var/log). - Also add plymouth-switch-root-initramfs.service to kexec.target.wants. kexec.target.wants uses --mode=shutdown, so the plymouthd-fd-escrow helper will run, so we need to switch to the initramfs. Signed-off-by: Hans de Goede <hdegoede@redhat.com>calculate-0.9.6_pre20211225
parent
a0c743c76a
commit
2a7755febb
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Tell Plymouth To Jump To initramfs
|
||||
DefaultDependencies=no
|
||||
# dracut-shutdown.service restores the initramfs when it is _stopped_
|
||||
# use Conflicts to make sure its ExecStop has run before we do
|
||||
Conflicts=dracut-shutdown.service
|
||||
After=plymouth-halt.service plymouth-reboot.service plymouth-poweroff.service plymouth-kexec.service dracut-shutdown.service
|
||||
ConditionPathExists=/run/initramfs/bin/sh
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --new-root-dir=/run/initramfs
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
Loading…
Reference in new issue