Plymouth re-read config when swap root ?

Hans de Goede hdegoede at redhat.com
Fri Sep 20 09:00:22 UTC 2019


Hi,

On 11-09-2019 15:35, LAHAYE Olivier wrote:
> Hi,
> 
> I’ve written a specially crafted Plymouth them for SystemImager software that shows the progress in host installation.
> 
> When the host is installed, the SystemIlager hooks give back control to dracut and the system boots without need to reboot before.
> 
> Though, when doing so, Plymouth keep systemimager them active (with no use) while I’d prefer to switch to installed OS theme.
> 
> Is there a way to tell Plymouth that it’s new default them has changed and that it needs to re-read it? I’m using dracut in CentOS-7, but I need generic solution. Does dracut tells Plymouth that /sysroot has been swapped? If yes will Plymouth take car of that by re-reading the default theme or should I add a hook to help for the transition? What if the installed OS has no Plymouth installed?

plymouth does get told that the /sysroot has been swapped, but currently we do not re-read
the config from the real rootfs when this happens.

And TBH I'm not sure if that doing so is desirable...

For your specific use-case I would suggest adding a new command which the plymouth
client can send to plymouthd, this would then need to hide-spash, re-read config,
show-splash. but this will always make the boot flicker / look ugly on every boot
unless you figure out how to do this only after imaging.

Hmm, I guess you could add a reload_theme command to the client (and implement it
in the daemon) which checks if the theme name has changed and otherwise is a no-op.

With my plymouth-upstream hat on I must warn you though that I'm not sure if I would
accept a patch implementing this. That would depend on how invasive it is. If you can
make it reasonable clean then we can take it.

Regards,

Hans



More information about the plymouth mailing list