fsck in Linux: Superblock last write time is in the future. FIXED

When rebooting the server and it shows this message:

Superblock last write time is in the future. FIXED

Move the file /etc/adjtime and set the hardware clock using the command below:

root@linux:~ # mv /etc/adjtime /etc/adjtime.bak

root@linux:~ # hwclock
Fri 27 Jun 2014 11:27:05 AM BRT -0.574168 seconds

root@linux:~ # hwclock —systohc —localtime

root@linux:~ # hwclock -w

root@linux:~ # hwclock
Fri 27 Jun 2014 11:30:17 AM BRT -0.616638 seconds

Also check if your system is using /etc/localtime as a file or link

root@linux:~ # ls -l /etc/localtime
-rw-r–r– 1 root root 2001 Aug 19 2010 /etc/localtime

root@linux:~ # ls -l /etc/localtime
lrwxrwxrwx 1 root root 31 Oct 13 2011 /etc/localtime -> /usr/share/zoneinfo/Brazil/East

The time will be different on boot if you use a separate /usr partition because /etc/localtime will point to an invalid file at startup

root@linux:~ # df -h /usr/share/zoneinfo/Brazil
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-usrlv
5.0G 2.5G 2.3G 52% /usr

Copy the file from /usr/share/zoneinfo to /etc/localtime

root@linux:~ # rm /etc/localtime
root@linux:~ # cp -p /usr/share/zoneinfo/Brazil/East /etc/localtime

Source: After reboot, the Linux system time is always wrong
Using the hwclock program

Advertisement