Bug 564325

Summary: forced file-system check on boot should show progress indicator
Product: [openSUSE] openSUSE 11.2 Reporter: robert spitzenpfeil <rs.opensuse>
Component: BasesystemAssignee: Jan Kara <jack>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: mmarek, msvec, mvancura, ro, werner
Version: Final   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE 11.2   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description robert spitzenpfeil 2009-12-13 22:42:32 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091103 SUSE/3.5.5-1.1.2 Firefox/3.5.5

A particularly large ext3 partition had reached it's max_mount_count and a file-system check was forced. After being informed of this fact, no further progress bar was shown.

As fsck.ext3 has the option "-C 0" already built in, why not use it ?
Especially new users may run out of patience and reset the system.

Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Jan Kara 2010-01-18 17:12:49 UTC
Thanks for the report. We already try to do that in init scripts so something went wrong (we detect whether we are running on /dev/tty1 and if so we run fsck with -C parameter)... Was this a root filesystem or some other one?
Comment 2 robert spitzenpfeil 2010-01-18 18:47:22 UTC
Data partition, lots of small files, about 100GB. It also contains /home if that matters.
Comment 3 robert spitzenpfeil 2010-01-18 22:02:53 UTC
/etc/init.d/boot.localfs:

------
if test "$REDIRECT" = "/dev/tty1" ; then
FSCK_OPTS="$FSCK_OPTS -C"
------

If I read the manual correctly it should be "$FSCK_OPTS -C 0". A similar method is used in /lib/mkinitrd/scripts/boot-mount.sh

But the real problem is that during startup $REDIRECT does not evaluate to "/dev/tty1" on my system, but to "/dev/char/../tty1". Therefore "-C 0" never gets set!
Comment 4 robert spitzenpfeil 2010-01-18 22:21:48 UTC
OK, forget about "-C 0". It works on a console once my system is up, but not in the init scripts. Leave it at "-C".

What helps though is a construct like this:

------
if test "$REDIRECT" = "/dev/tty1" -o "$REDIRECT" = "/dev/char/../tty1"; then
FSCK_OPTS="$FSCK_OPTS -C"
------
Comment 5 Jan Kara 2010-01-18 22:31:54 UTC
Yes, I thought it will be something like that... Thanks for debugging that. I think we might want to change showconsole to return saner path because also other boot scripts might malfunction when given such path. Werner, what do you think?
Comment 6 Dr. Werner Fink 2010-01-19 10:42:12 UTC
It would be much easier to use

     if test "${REDIRECT##*/}" = "tty1" ; then
          FSCK_OPTS="$FSCK_OPTS -C"
     fi

to make this sure.  This have to be done in

      /etc/init.d/boot.localfs
      /etc/init.d/boot.rootfsck

and maybe in

     /lib/mkinitrd/scripts/boot-mount.sh

as there is also /sbin/showconsole used to determine the
real phyical device used for the orginal system console.

Adding maintainers of aaa_base and mkinitrd to carbon copy list.
Comment 7 Jan Kara 2010-01-19 14:09:28 UTC
Yes, I agree such check would be fine. Ruedi, can you please fix that?
Comment 8 Ruediger Oertel 2010-02-14 23:05:10 UTC
submitted aaa_base to factory
changing needinfo for mkinitrd
Comment 9 Michal Marek 2010-02-17 12:36:16 UTC
Fixed in mkinitrd with http://gitorious.org/opensuse/mkinitrd/commit/a5c9f37a65f.
Comment 10 Jan Kara 2010-02-17 12:56:23 UTC
I've talked with Michal and he'll also include the fix into the nearest maintenance update of initrd in openSUSE 11.2.

Ruedi, could you please also add this fix to aaa_base in openSUSE 11.2 when there will be some update? Thanks.
Comment 11 Ruediger Oertel 2010-02-22 15:03:45 UTC
enqueued
Comment 12 Jan Kara 2010-02-22 17:33:03 UTC
Thanks. I'm closing the bug.
Comment 13 Dr. Werner Fink 2010-03-01 12:24:42 UTC
*** Bug 568349 has been marked as a duplicate of this bug. ***