[Bug 692355] Re: fsck doesn't update system info on login

Steve Langasek steve.langasek at canonical.com
Thu May 3 23:14:48 UTC 2012


Looks like the bug is here in /usr/lib/update-notifier/update-motd-fsck-
at-reboot:

# check time when we did the last check
stamp="/var/lib/update-notifier/fsck-at-reboot"
if [ -e "$stamp" ]; then
    stampt=$(stat -c %Y $stamp)
else
    stampt=0
fi

now=$(date +%s)
if [ $(($stampt + 3600)) -lt $now ] || [ $stampt -gt $now ]; then
    #echo $stampt $now need update 
        NEEDS_FSCK_CHECK=yes
fi

If you log in on console triggering a refresh of the file, then reboot
and get the fsck, then log in again once the system finishes booting,
there will be a current stamp file and the check will not be re-run.

We should probably compare the file's timestamp with the uptime, and set
NEEDS_FSCK_CHECK=yes if it's older than the last reboot.

** Changed in: update-notifier (Ubuntu)
       Status: Fix Released => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/692355

Title:
  fsck doesn't update system info on login

Status in “update-notifier” package in Ubuntu:
  Triaged

Bug description:
  Every time I login to my Ubuntu 11.04 Alpha 1 (server), I see this
  message:

  *** /dev/sda5 will be checked for errors at next reboot ***

  I have done both the 'touch /forcefsck' (file is gone after reboot)
  and I have done 'shutdown -rF now' and yet the message is still
  displayed.  I checked my boot.log and fsck did run:

  fsck from util-linux-ng 2.17.2 
  fsck from util-linux-ng 2.17.2 
  /dev/mapper/sh*tbox1-root: clean, 103845/4669440 files, 1179707/18669568 blocks
  /dev/sda5: clean, 245/124496 files, 83515/248976 blocks

  Since fsck did run successfully, the '*** /dev/sda5 will be checked
  for errors at next reboot ***' message should not appear again unless
  the system has determined the filesystem is dirty. I seriously doubt
  that this not very old drive is having this many problems, especially
  since the OS runs 24/7 with no problems besides this.

  lsb_release -rd:
  Description:    Ubuntu natty (development branch)
  Release:        11.04

  uname -a output:
  Linux node1 2.6.37-10-server #24-Ubuntu SMP Thu Dec 16 18:10:40 UTC 2010 x86_64 GNU/Linux

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/692355/+subscriptions




More information about the foundations-bugs mailing list