Using plymouth to install updates at startup time

Lennart Poettering lennart at poettering.net
Tue Jun 19 13:04:46 PDT 2012


On Sun, 03.06.12 10:08, Ray Strode (halfline at gmail.com) wrote:

Heya,

> Oh right, the initrd already started it presumably.  Though, you'll
> want to make sure it still gets started on systems that don't have
> initrds too:
> 
> (see for instance,
> http://www.harald-hoyer.de/personal/blog/fedora-17-boot-optimization-from-15-to-3-seconds
> and http://freedesktop.org/wiki/Software/systemd/Optimizations for
> examples of people booting without initrds)

No need for extra work on this. The unit files for plymouth already take
care of this. They will spawn plymouthd very early during boot, but only
if it hasn't already been started by the initrd. There's nothing special
needed to be done for Hughsie.

> > For the third point I probably want to do "plymouthd --mode=shutdown"
> > and set a message using "plymouth display-message --text=foo"
> I think since plymouthd is already running we should avoid starting a
> new plymouthd

Hmm, so the normal logic in the plymouth unit files should take care for
this too. However they always show the same text, regardless whether we
are booted normally or for system update mode. That said, I don't think
this is really a problem, because shutdown is now so fast that you
barely can see that anyway.

So my recommendation would actually be to have the system update script
as last step just push out the "System succesfully updated" message, and
then wait for 5s or so, and then continue going down/reboot. That way
you'd see the success message and it would be replaced by the
shutdown/reboot message for a split second only.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the plymouth mailing list