Opened 4 years ago

Closed 4 years ago

#4064 closed defect (fixed)

Messy display from checkfs

Reported by: ken@… Owned by: lfs-book@…
Priority: normal Milestone: 8.1
Component: Book Version: SVN
Severity: normal Keywords:


I had reason to force an fsck, so I created /forcefsck and rebooted. That worked fine, but there were two slightly messy things in the output:

  1. '[ *] efsck found...' instead of '/forecefsck'.

I have a trivial change prepared to fix this.

  1. While fsck'ing a filesystem with whatever is used to force verbosity there is a bar at the right of the output, followed by a percentage. On all except the rootfs the bar and percentage get deleted. But on the rootfs they remain (in that case I think it is a countdown, it left a tiny percentage - the others seemed to count up).

For this I have no idea where to look, and I personally don't find it annoying like the first item.

Change History (3)

comment:1 by bdubbs@…, 4 years ago

The output for the checkfs script is:

  log_success_msg "\n/forcefsck found, forcing file system checks as requested."

That \n by itself is causing the problem. It probably should be

  log_success_msg "\n     /forcefsck found, forcing file system checks as requested."

adding 5 spaces for the SUCCESS_PREFIX at the start of the line. See if that works for you.

For the second issue, the bootscripts do not control the output of fsck.

If the environment variable VERBOSE_FSCK is set, then the command 'fsck -f -a -A -C -T' is run. We don't set VERBOSE_FSCK anywhere in our scripts so it must be set manually by the user. If VERBOSE_FSCK is not set than outout is directed to /dev/null. (stderr still goes to the screen).

The -C option displays completion/progress bars. Other options are:

-a     Automatically repair the filesystem without any  questions
-A     Walk through the /etc/fstab file and try to check all filesystems in
       one run.
-T     Don't show the title on startup.

-f     Force checking even if the file system seems clean.

I don't know what you want to do about this, if anything.

comment:2 by ken@…, 4 years ago

For the first point, my trivial fix is:

--- checkfs.orig	2017-03-16 20:37:09.765920497 +0000
+++ checkfs	2017-03-16 23:40:11.087998544 +0000
@@ -69,8 +69,8 @@
       if [ -f /forcefsck ]; then
-         msg="\n/forcefsck found, forcing file" 
-         msg="${msg} system checks as requested."
+         msg="${msg}/forcefsck found, forcing file" 
+         msg="${msg}system checks as requested."
          log_success_msg "$msg"

I'll look at the second part later, for the moment all I can say is that I do have VERBOSE_FSCK=yes in on all my machines (waiting for a small fs to fsck without any message is annoying, waiting for a 3TB fs to fsck with no indication of progress is horrible). Thanks for taking the time to look at this.

comment:3 by bdubbs@…, 4 years ago

Resolution: fixed
Status: newclosed

Checked and reformatted all messages in the checkfs boot script.

The /forcefsck change as above works well, but the other messages, although rare, did not format well either.

Fixed at revision 11209.

Note: See TracTickets for help on using tickets.