Shipping a theme only in the initramfs

João Paulo Rechi Vita jprvita at gmail.com
Fri Mar 17 14:08:49 UTC 2017


Hello Plymouth hackers,

At Endless we have been working on customizing the boot splash without
having to modify the root file system, which is OSTree-controlled. The
approach we have taken is packing the custom splash theme +
plymouth.defaults into an extra initramfs, which is passed to the
kernel by grub, in addition to the regular initramfs (the kernel
overlays the two images). There is a problem with that approach tho,
which is when the switch root happens before the boot splash is shown,
the custom theme is not available because the initrd is already gone.

A fix for this problem is to have a systemd unit running before
plymouth-start.service copy the theme to /run (and adjust its
ImageDir), and have a small modification in plymouth to check if the
theme exists inside /run/plymouth/themes when resolving the theme
path. Do you guys see any obvious problems on this approach, or have a
better suggestion? I am aware that on shutdown plymouth will read
plymouth.defaults from the rootfs and use the distro-default theme,
but that is not a problem for the time being.

Thanks and best regards,

--
João Paulo Rechi Vita
http://about.me/jprvita


More information about the plymouth mailing list