fsck + localtime in BIOS
jbrown at kmts.ca
Tue Jan 30 00:34:14 PST 2007
I was having a problem with my LFS setup where, on the 1st boot, checkfs
Checking file systems...
/dev/hda1: Superblock last mount time is in the future. FIXED.
/dev/hda1: Superblock last write time is in the future. FIXED.
/dev/hda1 has gone 49710 days without being checked, check forced.
/dev/hda1: ***** REBOOT LINUX *****
File system errors were found and have been corrected, but the nature of
the errors require this system to be rebooted.
After you press enter, this system will be rebooted
I eventually tracked down the problem to the fact that fsck runs before
the setclock bootscript. My computer is set up to dual boot with
Windows XP, so I have my BIOS clock set to localtime (Central Time,
Canada). I believe what happens is that, if I reboot the computer, when
the checkfs runs, fsck interprets the superblock last write time as
being in the future because up to this point it still believes that the
BIOS clock is set to UTC.
The fix was trivial:
cd /etc/rc.d/rcsysinit.d/ && mv S60setclock S25setclock
For the record this first started happening when I upgraded to
e2fsprogs-1.39. Also I believe that if I had set up my BIOS and LFS to
use UTC, or if I lived east of GMT, I would not have seen this problem.
More information about the lfs-dev