Skip to content

Instantly share code, notes, and snippets.

@krzys-h
Created January 15, 2021 00:09
Show Gist options
  • Save krzys-h/6ec7c7ca1c381c3a5546b1dd51bd68ca to your computer and use it in GitHub Desktop.
Save krzys-h/6ec7c7ca1c381c3a5546b1dd51bd68ca to your computer and use it in GitHub Desktop.
Display systemd init messages on the plymouth boot screen
#!/bin/sh
journalctl --quiet -f -n0 --system -t systemd -o cat | while read -r line; do
plymouth display-message --text="$line"
if [ $? -ne 0 ]; then
break
fi
done
echo "Plymouth died, exiting..."
# /etc/systemd/system/plymouth-boot-messages.service
# Run "systemctl enable plymouth-boot-messages.service" after creating the file
[Unit]
Description=Display boot messages on the plymouth screen
DefaultDependencies=no
# You may want these if your plymouth is not started by initramfs, but I want the script to take effect as soon as possible...
#After=plymouth-start.service
#Requires=plymouth-start.service
[Service]
Type=simple
ExecStart=/usr/local/bin/journalctl_to_plymouth.sh
RemainAfterExit=yes
[Install]
WantedBy=sysinit.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment