# A Filesystem problem [SOLVED]

## rpil

By the end of the year, I had a problem on my desktop installation.  As I opened the PC, when it tried to mount the root filesystem, it stopped and I saw the following message:

```
Superblock last mount time (Mon Dec 21 20:27:04 2009,

    now = Sun Dec 20 14:39:39 2009) is in the future.

    /:UNEXPECTED INCONSISTENCY, RUN fsck MANUALLY.

    (i.e., without -a or -p options)

    *Filesystem couldn't be fixed 

    Give root password for maintenance

    (or type Control-D to continue):
```

I realized that it was a wrong date/time problem, that I've solved by changing my timezone from local to UTC. The message stopped until yesterday!

Now, when I boot, it asks me to run fsck, but even when I do this, the system remains with errors.

What can I do to get rid of this message and have a normal boot?

It is OK, to boot from a live CD and run "fsck -f /dev/sda3"?Last edited by rpil on Thu Jan 14, 2010 12:28 pm; edited 2 times in total

----------

## Poedel

I think it is okay, if it is note mounted. I would do and try.

----------

## rpil

I've done it, through an Ubuntu live CD.  I rebooted and ...always the same story!!!

It says:

Superblock last mount time (Tue Jan 12 23:03:56 2010, now= Wed Jan 6 03:49:52 2010)

is in the future.

Fix <y>? yes

/contains a file system with errors, check forced.

Pass 1: Checking inodes, blocks and sizes

Pass 2: Checking directory structure

Pass 3: Checking directory connectivity

Pass 4: Checking reference counts

Pass 5: Checking group summary information

/: ***** FILE SYSTEM WAS MODIFIED *****

/: ***** REBOOT LINUX *****

/: 613124/15228928 files (4,5% non-contiguous), 3816721/60910447 blocks

What is this?? It sees as current date the 6th of January??  Why? My timezone is OK, my date/time is (now) 13 Jan 00:16, so, what's happening? It is a BIOS problem? Low battery?  What?

When I reboot, I see something like this:

With fsck, the filesystems errors are not totally corrected and it will need a manual repair!

What "manual"?  I made fsck through the Ubuntu Live CD, what else?

With Ctrl-D, the booting continues and I enter the system, but with the next boot, I meet the same problem!

It says that some file in /etc/conf.d, init.d or rc.conf, is in the future!!!  :Confused:   :Sad: 

----------

## cach0rr0

what does hwclock show as your date? 

how do you manage time, via ntp or which? 

cant help but think one of these should sort you (hwclock switches)

```

      -s, --hctosys

              Set the System Time from the Hardware Clock.

              Also set the kernel's timezone value to the local timezone as indicated by the TZ environment  variable  and/or  /usr/share/zoneinfo,  as

              tzset(3)  would  interpret  them.   The obsolete tz_dsttime field of the kernel's timezone value is set to DST_NONE. (For details on what

              this field used to mean, see settimeofday(2).)

              This is a good option to use in one of the system startup scripts.

       -w, --systohc

              Set the Hardware Clock to the current System Time.

```

----------

## Mike Hunt

... also this will fix the system time:

```
emerge net-misc/rdate

rdate -s tick.ucla.edu

hwclock --utc --systohc

rm /etc/adjtime 

emerge -av net-misc/ntp

eselect rc add ntpd default

rc
```

To see what ntpd is doing, after a while run:

```
ntpq -c pe

ntpq -c rv
```

----------

## rpil

Well, it was less complicated, finally!

First, I checked the BIOS date/time: It was wrong!

```
gentoo drphibes # hwclock

Wed Jan  6 03:22:21 2010  -0.831639 seconds
```

I gave:

```
hwclock --systohc
```

I checked again: Now it was OK!

```

gentoo drphibes # hwclock

Wed Jan 13 11:06:20 2010  -0.295590 seconds
```

After, I gave:

```
cd /

touch /forcefsck
```

and I rebooted my machine.

It checked the filesystem and this time the boot it was complete, without asking for a manual fsck or Ctrl-D.

I checked once again the BIOS clock:

```
gentoo drphibes # hwclock

Wed Jan 13 11:10:17 2010  -0.320699 seconds
```

Now I'm in, without any boot problem.  I think it' s solved!

Thank you all!  :Wink: 

----------

