# superblock last write time is in the future

## genfive

I keep getting this warning message during the boot time:

/dev/hd?? Superblock last write time is in the future.  FIXED

where hd?? is all the partitions.

But the next time I boot, the same message shows up again.  Has anyone seen the same problem? What's causing it?

----------

## wynn

Is your system clock/hardware clock correct?

Do you have an /etc/adjtime and, if you do, does it have a smallish number as the first one on the first line?

```
$ cat /etc/adjtime

0.979777 1154687552 0.000000

1154687552

UTC
```

----------

## genfive

here is what I have :

```

aerith jim # cat /etc/adjtime

0.000000 1153055019 0.000000

1153055019

LOCAL

```

----------

## wynn

 *Quote:*   

> 
> 
> ```
> aerith jim # cat /etc/adjtime
> 
> ...

 That's OK.

And your system clock and hardware clock are correct? System clock

```
date
```

hardware clock

```
hwclock --show
```

----------

## genfive

yup. both seem to be correct.  actually, this problem is seen on both my computers, so I suspect it is related to a bug or something

----------

## wynn

What filesystem are you using? What version (in case it's reiser4)? In what kernel?

----------

## genfive

I am using ext3, not reiser4. the kernel is the latest 2.6.17-r4, if I remember correctly (at school right now)

----------

## wynn

 *Quote:*   

> so I suspect it is related to a bug

 You're right! Given ext3 it was possible to search for it:

http://www.linuxpackages.net/forum/viewtopic.php?t=14974&sid=2f61342792a2d15953ed392fa9280886

 *Quote:*   

> Wed Jun 21, 2006 9:58 pm    Post subject: slackware current problems
> 
> ...
> 
> problem 2 e2fsprogs version 1.39 is messed up on boot as far as the time
> ...

 

----------

## genfive

how did you find that information? I feel bad because I should've done that myself, but always I have very little luck in finding things :S.  But thank you so much for sticking with me on this issue.

----------

## wynn

 *Quote:*   

> how did you find that information?

 

Googled for 

```
superblock "time in future"
```

 *Quote:*   

> I feel bad because I should've done that myself,

 You're in school â I'm not   :Very Happy: 

----------

## obvio171

 *wynn wrote:*   

> You're right! Given ext3 it was possible to search for it:
> 
> http://www.linuxpackages.net/forum/viewtopic.php?t=14974&sid=2f61342792a2d15953ed392fa9280886
> 
>  *Quote:*   Wed Jun 21, 2006 9:58 pm    Post subject: slackware current problems
> ...

 

So the solution is to set system time to utc? Isn't there a solution where I can keep my system time set to local? Thanks!

----------

## wynn

It doesn't seem that anything has gone wrong, just that mount (?) from e2fsprogs isn't taking account of the hardware clock being set to local time. Presumably the "last mount time" is set to real UTC from the kernel: if you are sufficiently West of the Greenwich meridian then what it takes to be UTC from the hardware clock (in fact several hours earlier than UTC) makes it think the "last mount time" is in the future.

If you are East of the meridian, of course, it just thinks it's had a few hours more sleep   :Smile: 

It says FIXED and if it was really worried the boot process would stop.

----------

## Ivar_Y

Look at https://bugs.gentoo.org/show_bug.cgi?id=142850.

Ivar

----------

## AssociateX

On Gentoo I set CLOCK="UTC" in /etc/conf.d/clock then I booted to Win2k and set the timezone to GMT for Greenwich. Gentoo now has the correct time all around, hwclock and system clock and Win2k displays the correct time in the clock display. I don't know if there are any other clocks to check with Windows, though.

Best of all, the fsck "Superblock last write time is in the future" message/error is gone at boot time. Checking the last write time is a newer feature of fsck.

I also have set in rc-update ntp-client | default and in /etc/conf.d/clock CLOCK_SYSTOHC="yes" to keep the hwclock on time.

Also for info purposes, Unix was intended to use UTC and not a local hack. The only reason the local option is available is for dual booters who have crappy windows which wants the hardware clock to use local and not UTC. Gentoo is my main OS (I use 99.876% of the time) that is why I setup Gentoo correctly and set the timezone incorrectly on windows to get the correct time there. If I'm going to do something dumb to get the clock to work it's going to be on windows not Gentoo.

If you get "Superblock last write time is in the future" but have CLOCK="UTC" in /etc/conf.d/clock then you probably have /usr on a separate partition with a ln -s to  /usr/share/zoneinfo/ to /etc/localtime. Instead of ln -s try cp, for me I did: 

```
cp /usr/share/zoneinfo/America/North_Dakota/Center /etc/localtime
```

I hope that this info helped a bit.

----------

## AssociateX

Today is the first day that I've used these settings and it's great. First time ever that the timestamps in xchat were correct.

----------

