Tuesday, March 27, 2012

Time, and the past!

Well, today (after being awakened at 5.15am for a callout) I learned an important lesson:
"If your BIOS is ever set to use local time, and you run Linux, fix it so that you can set the BIOS to UTC!!"

I dual boot Windows/Linux on my laptop for a couple of reasons (remote logging into work, some video games, the nvidia optimus drivers) - but am usually in Linux.

I have found that my time has always been off, but I just thought that it had to be something to do with it being off the network and some sort of NTP foul-up.
.... NOPE!!

I found that seemingly 2 parts of the booting sub-system (hwclock and the kernel) didn't work together correctly, and seemed to shift the time back by exactly an hour on bootup (and saved it that way too).
The way to fix it?
Set your BIOS to using UTC time, correct /etc/adjtime (UTC instead of LOCAL on the third line), then get a registry entry for Windows called "RealTimeIsUniversal" (this should probably be the first step - but like I said, I usually use Linux).

I also learned that setting your clock in the future can cause problems with mounting filesystems on bootup - so keep a USB stick handy!!

No comments: