You are here

howto: fix superblock last mount time error

sometime during the middle of the night, the electricity cut out. thats normally not a problem, but this time it was because apparently my cmos battery died. so all my bios settings died and some other items that depend on the cmos battery.

anyways i sat down and reconfigured my bios as much as i remembered (does anybody document changes to the bios?!) then started up my pc, assuming all was well.

actually, no i got this message which i noted down

Checking filesystems
/dev/mapper/vg_1-lv_root : superblock last mount time (jul 1
now= Jan 1 is in the future.
/dev/mapper/vg_1-lv_root : UNEXPECTED INCONSISTENCYL RUN fsck MANUALLY

took me 5 minutes of staring and head scratching till i noticed that line about "in the future". so while i was in rescue mode i carried out the following command

date +%Y%m%d -s "20100703"

which set my operating system clock's date to today's date

i then did a reboot. and after the system booted up properly.

there are 2 services which can help you set exact time. ntpdate and ntpd. ntpdate forces your operating system time to the ntp server's time and ntpd maintains the sync between the two.

problem fixed