[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Skipping fsck during boot with systemd?

On Fri 12 Dec 2014 at 10:11:53 +0000, Darac Marjal wrote:

> On Thu, Dec 11, 2014 at 07:48:16PM +0000, Brian wrote:
> > On Thu 11 Dec 2014 at 14:02:52 -0500, Jerry Stuckle wrote:
> > 
> > > On 12/11/2014 1:23 PM, Brian wrote:
> > > > 
> > > > For less work to set up than the previous method you want to take a look
> > > > at
> > > > 
> > > >    https://bugzilla.redhat.com/show_bug.cgi?id=799574
> > > >  
> > > 
> > > To which Lennart responded that is not a good idea.
> > 
> > Who am I to argue with a super-coder's views. :) I would look at it this
> > way:
> > 
> > He says
> > 
> >   If an fsck is started after boot is complete we really shouldn't try to
> >   take posession of /dev/tty1 again, since X11 or a getty might run on it,
> >   and things would get very confused if we'd try to read input from that.
> There's a solution to this. Stopping fsck is basically a similar task to
> mounting a crypto disk - inasmuch as you want to drop out of the
> parallel boot mode (so, if fsck is necessary, all current start-tasks
> (which don't depend on this disk) should be allowed to complete) and
> allow interaction with the operator. Isn't this what plymouth is for?
> As I understand it, Plymouth allows interaction with the operator even
> if the task is running in parallel and is "backgrounded" somewhere.
> If the fsck happens once plymouth has completed, then I think it's
> probably safe to assume that multi-user mode is available. In which
> case, you can simply allow for "systemctl stop Some-Mount-Task" to
> safely terminate fsck.

Sounds an interesting approach. My familiarity with plymouth is very
sparse so testing of this idea is down to the people who want to cancel
an in-progress fsck.

I've become a bit happier with "StandardInput=tty" but one could use a
solution based on ExecStart, which works without having to touch a tty.

Replace the ExecStart line in systemd-fsck@.service with


fsckcancel is an executable sh script which contains code to compare the
"Mount count" with the "Maximumum mount count" and then, depending on
the result of the comparison, runs an fsck on a partition or exits.

There we are: cancellation without having to lift a finger to hit a key.

Reply to: