fsck halts bootup when checked file has timestamp in the future from other Ubuntu installation

Bug #422869 reported by Scott Ritchie
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
clock-setup (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: e2fsprogs

I currently dual boot Karmic and Jaunty on separate disks, however they mount eachothers partitions and share data. Today when I rebooted from Jaunty into Karmic the startup was halted and dropped me to a repair shell during the fsck:

/var/log/fsck/checkfs:

Log of fsck -C3 -R -A -a
Tue Sep 1 07:37:27 2009

fsck from util-linux-ng 2.16
/dev/sda6: Superblock last write time (Tue Sep 1 14:36:33 2009,
        now = Tue Sep 1 07:37:27 2009) is in the future.

/dev/sda6: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
fsck died with exit status 4

Tue Sep 1 07:37:27 2009
----------------

It was 14:37 Pacific time (my computer's time zone) when I booted up, and shortly before that when I shut down, however Karmic appears to think it's about 7 hours earlier, which I believe is UTC. When I finish booting Karmic connects to the internet and sets the gnome-clock to the proper (pacific) time, so I never noticed that the internal clock was off until it blocked bootup.

ProblemType: Bug
Architecture: amd64
Date: Tue Sep 1 14:42:05 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: e2fsprogs 1.41.9-1ubuntu1
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-8.28-generic
SourcePackage: e2fsprogs
Uname: Linux 2.6.31-8-generic x86_64

Revision history for this message
Scott Ritchie (scottritchie) wrote :
Revision history for this message
Theodore Ts'o (tytso) wrote :

At a guess, your Jaunty and Karmic installations disagree about whether the hardware clock should be to tick localtime or UTC time, and one of the things the shutdown scripts do is to set the hardware clock from the system clock. This causes the time at boot up to be incorrect until NTP has a chance to correct things.

This isn't an e2fsprogs bugs, but rather a system configuration error.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

I acknowledge that, however I don't think it's a reasonable assumption for e2fsprogs to assume the system booting has the correct time in that way -- failing to bootup and dumping the user to a recovery terminal from the automatic check is probably the worst thing to do here.

Revision history for this message
Theodore Ts'o (tytso) wrote :

There's an easy fix....

Put the following in /etc/e2fsck.conf

[options]
 buggy_init_scripts = 1

This used to be the default for Ubuntu systems, partially because Ubuntu's init scripts *were* buggy, way back when, but partially also because Ubuntu users don't seem to care about making sure their systems are appropriately set up, and they are much more likely to what to have their hardware clocks tick localtime (with all of the daylight savings time / summer time problems inherent in it) due a desire to be bug-for-bug compatible with Windows. I dropped this in because I was sick and tired of having Ubuntu users complain about this problem, when literally *no* *other* *distribution* seems to have issues with this except Ubuntu.

Scott Remnant decided to remove this in Karmic, although my upstream sources explicitly tests for the Ubuntu distribution and drops this in. (funny thing; Debian users don't complain about this) You'll have to take this up with Scott.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 422869] Re: fsck halts bootup when checked file has timestamp in the future from other Ubuntu installation

 status incomplete

On Tue, 2009-09-01 at 22:07 +0000, Theodore Ts'o wrote:

> At a guess, your Jaunty and Karmic installations disagree about whether
> the hardware clock should be to tick localtime or UTC time, and one of
> the things the shutdown scripts do is to set the hardware clock from the
> system clock. This causes the time at boot up to be incorrect until
> NTP has a chance to correct things.
>
Indeed, this is the most likely explanation.

Can you supply the contents of "grep UTC /etc/default/rcS" from your
jaunty and karmic installations.

Scott
--
Scott James Remnant
<email address hidden>

Changed in e2fsprogs (Ubuntu):
status: New → Incomplete
Revision history for this message
Scott Ritchie (scottritchie) wrote :

Jaunty: $ grep UTC /etc/default/rcS
UTC=no

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Karmic: $ grep UTC etc/default/rcS
UTC=yes

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Thanks.

That's a clear configuration issue.

You're dual-booting between two systems that are storing different values in the hardware clock, and expecting to find different values there.

It's no different to having UTC=yes and dual booting between Linux and Windows, the hardware clock will go all over the place. You're just compounding it by mounting the same filesystems in both, so not only is the hardware clock getting screwed, so is the filesystem.

Set UTC= to the same value on both systems.

Changed in e2fsprogs (Ubuntu):
status: Incomplete → Won't Fix
Revision history for this message
Scott Ritchie (scottritchie) wrote :

Should it worry us that I don't remember ever actually set this manually myself?

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

On Wed, 2009-09-02 at 15:48 +0000, Scott Ritchie wrote:

> Should it worry us that I don't remember ever actually set this manually
> myself?
>
Did you originally dual-boot with Windows?

Scott
--
Scott James Remnant
<email address hidden>

Revision history for this message
Scott Ritchie (scottritchie) wrote :

I received my laptop with a windows installation on its first hard disk. I installed Jaunty on the second disk and never booted into Windows on the first, so I guess it was dual boot of sorts (albeit entirely different disks/filesystems)

When I later installed Karmic I wiped the Windows disk to install it on top of.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Right, this looks like a karmic installer bug ;)

affects: e2fsprogs (Ubuntu) → clock-setup (Ubuntu)
Changed in clock-setup (Ubuntu):
status: Won't Fix → Triaged
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

I suspect Colin already fixed this and will mark this as a dup of another bug

Revision history for this message
Mathieu Marquer (slasher-fun) wrote :

>Right, this looks like a karmic installer bug ;)
I guess so: I've made a fresh install from karmic alpha 5 amd64 on a computer, and almost each time I boot I get the "timestamp in the future" error. I'm not dual booting with anything.

Revision history for this message
Cristian Gafton (gafton) wrote :

I am also getting this on my karmic upgrade from jaunty. I am running with UTC=yes in my rcS. The problem in my case seems to arise from the fact that the init scripts do not restore the system clock from the hardware clock before launching into fsck.

I had to put the following into my /etc/init/mountall.conf
pre-start script
    /sbin/hwclock -s
end script

However, that is a kludge, as mountall should really depend on getting the hwclock read and the system clock updated through the regular hwclock.sh script

Revision history for this message
Cristian Gafton (gafton) wrote :

When the hardware clock is stored in UTC, the issue is of particular visibility to those living in GMT-hh timezones and whose system clocks "go back" in time on every boot until they're re-adjusted from the hardware clock.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This issue has definitely been fixed.

If you are still seeing issues with the hardware or system clock, you do not have *this* bug. You should file a new bug, so we can triage your problems independently

Thanks

Changed in clock-setup (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.