[systemd-devel] How to implement fsck progress report with systemd and plymouth?

Ray Strode halfline at gmail.com
Tue Apr 26 13:59:35 PDT 2011


Hi,

On Sun, Apr 24, 2011 at 5:19 PM, Lennart Poettering
<lennart at poettering.net> wrote:
>> plymouth in Ubuntu 10.04 supports fsck progress report, and also
>> provides a chance for user to cancel running fsck. How to implement
>> this feature with systemd and plymouth?
>
> It's actually a really hard problem. For example, what do you do when
> you have multiple disks which are fsck'ed in parallel or serial? You'd
> then have to integrate their individual progress bars somehow.
I guess for a lot of themes, just one progress bar at a time for

"Disks getting checked"

should be enough, but should probably be up to the theme to decide how
detailed to go.

> Here's what I'd suggest: We already have systemd-fsck, which we could
> beef up slightly to pass progress data to a tiny AF_UNIX socket
> activated service (let's call it fsckd) which integrates the data from
> multiple instances of systemd-fsck and sends it off to plymouth. And if
> a cancel request is received from plymouth it would send off SIGINT to
> the the systemd-fsck instances which it got data from.
So on the plymouth side of the fence,  I had origionally envisioned
something analagous to how passwords are handled.  So instead of

plymouth ask-for-password --command "cryptsetup ...."

something like

plymouth show-filesystem-check --command "fsck ..."

So in your proposal (which sounds fine) we wouldn't have that at all,
but instead of have fsckd take that role.

So we'll need some new protocol, I guess, to notify plymouthd of a new
fsck operations as they come in, and protocol for updating the status
of existing fsck operations.  Then plymouthd will just pass that info
on to the theme and let it figure out what to do with it.  I guess
fsckd will have multiple concurrent connections to plymouthd that
don't close until the fscks complete.  That way we have a
communication channel back to fsckd to report cancelation.

--Ray


More information about the systemd-devel mailing list