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

Re: Seeing progross during fsck on boot



On Sat, Sep 03, 2022 at 09:56:34AM +0100, Mike wrote:
> Rereading my original request, I think perhaps I wasn't entirely clear
> on a couple of points:

I thought it was clear.  Some of the responses completely baffled me.
One person even mentioned xterm -- like, *what*?  How does xterm come
into play when you're booting a server and there's no GUI yet?

> Maybe I'm being nostalgic but I seem to recall in days gone by that fsck
> printed a progress bar out of hashes to show how it was getting along.

Near as I can tell, that was a feature of the old sysv-rc scripts,
which ran (originally/mostly) in series, instead of in parallel.  The
fsck progress bar(s) seem to have been lost in the move to systemd,
perhaps because writing a progress bar isn't considered viable in a
highly parallel boot system where other things might also be trying to
write to the console.  Or perhaps for other reasons.

It appears that systemd-fsck(8) is the documentation for the new regime.
Note this paragraph:

       systemd-fsck does not know any details about specific filesystems, and
       simply executes file system checkers specific to each filesystem type
       (/sbin/fsck.type). These checkers will decide if the filesystem should
       actually be checked based on the time since last check, number of
       mounts, unclean unmount, etc.

Also note that /lib/systemd/systemd-fsck is a compiled program, not a
shell script, so we can't just go in and edit the thing to make it pass -C.

Now, here's an interesting thing: fsck.ext(4) refers to e2fsck.conf(5).
Did you know that e2fsck (aka fsck.ext4) has a configuration file?  I
didn't either.

e2fsck.conf(5) says that the pathname is /etc/e2fsck.conf (which doesn't
exist by default on Debian 11).  It also says that there are some options
available, which can be set in the configuration file:

       report_features
              If  this  boolean  relation  is true, e2fsck will print the file
              system features as part of its verbose reporting (i.e.,  if  the
              -v option is specified)

       report_time
              If  this boolean relation is true, e2fsck will run as if the op‐
              tions -tt are always specified.  This will cause e2fsck to print
              timing  statistics  on a pass by pass basis for full file system
              checks.

       report_verbose
              If this boolean relation is true, e2fsck will run as if the  op‐
              tion  -v  is  always specified.  This will cause e2fsck to print
              some additional information at the end of each full file  system
              check.

Unfortunately, I couldn't find any wording about the progress bar.  I don't
see how to turn that on from the config file.

So... sadly, I don't see a simple way to get the progress bar back.  You
could play around with this e2fsck.conf file and see what the options do,
or you could edit the freakin' systemd SOURCE CODE to change how
systemd-fsck calls fsck.  I don't see a sensible way to insert a wrapper
script into the execution flow, so I really wouldn't try going down that
road.

If none of these options work, you might need to talk to the systemd people
about it, maybe putting in a feature request, or seeing if one of them knows
a trick that'll work.


Reply to: