Linux guest OS clock wrong each restart

davide

Member
I've installed Unbuntu under Parallels on my Macbook Pro. Impressive but there is one show stopper. I have to reset the guest OS time every time I launch a sit comes up 4 hours behind. The time zone is set correctly. I've tried manually setting the time and syncing to a time server. (The host OS is also synced to a time server. The clocks match, until the next time launch and the guest linux OS is exactly 4 hours behind again.

I tried using hwclock from within th elinux guest with no effect.

Suggestions?
 
Problem solved. The info at the link I gaved solved the problem!

As root, edit /etc/default/rcS

find the line UTC=yes

and change it to

UTC=no

restart.
 
different problem, same symptom?

My guest machine's clock is also off (let's see, 18 hours behind), but /etc/default/rcS says

UTC=no

Hmmmm.
 
does installing the NTP packages and then setting it to run in a startup script and/or from CRON not help ?
 
That's interesting. When I installed Slackware, it asked me during the set up if my HW clock was set to UTC, I answered no, and the clock is correct in Slack as well. Time is correct in Mac OS, yes?
 
darkone said:
does installing the NTP packages and then setting it to run in a startup script and/or from CRON not help ?

Actually, yes, it did. That and a few reboots, and I seem to have a synchronized clock. I seemed to have suffered both from drift and a timezone issue. All is well now. Thanks!
 
davide said:
I've installed Unbuntu under Parallels on my Macbook Pro. Impressive but there is one show stopper. I have to reset the guest OS time every time I launch a sit comes up 4 hours behind. The time zone is set correctly. I've tried manually setting the time and syncing to a time server. (The host OS is also synced to a time server. The clocks match, until the next time launch and the guest linux OS is exactly 4 hours behind again.

I tried using hwclock from within th elinux guest with no effect.

Suggestions?
$ hwclock --hctosys --localtime

toss that in /etc/crontab as

* * * * * root hwclock --hctosys --localtime

will get your time right and doesn't clutter the network. changing your system off UTC is good too.

wish this kind of advice came with install docs. nifty tools app for windows... but you're at the mercy of the forums if you want to run linux guest. which strikes odd to me, considering theres a parallels version for linux..
 
Last edited:
davide said:
I was given this link over on the Ubuntu forum.

http://www.xs4all.nl/~hajk

I've not yet had a chance to try the suggestions.

That's my link, actually. I have now posted an update on installing Edgy in a Parallels VM.
There is also the fast clock issue common to all VMs (not just Parallels), my updated note shows how the "clock=pit" kernel option should be used, in connection with periodic synchronization with time servers (set this up in the System-Administration-Time and Date menu). Finally, my note also shows some useful keyboard tweaks and the way to get the Ubuntu boot splash going.
 
hkoster1 said:
That's my link, actually. I have now posted an update on installing Edgy in a Parallels VM.
There is also the fast clock issue common to all VMs (not just Parallels), my updated note shows how the "clock=pit" kernel option should be used, in connection with periodic synchronization with time servers (set this up in the System-Administration-Time and Date menu). Finally, my note also shows some useful keyboard tweaks and the way to get the Ubuntu boot splash going.

Thanks for these tips! Using them, I was able to fix my persistent clock problems in Ubuntu running under Parallels on my MacBook Pro (which not only resulted in times being off, it also screwed with SSL-secured connections to my mail servers, since SSL is timing-sensitive).

Regarding the splash screen, note that the usplash customization howto says the kernel parameter for a 1024x768 splash is vga=791, not vga=792. But both seem to work and to present the same sized splash (at least, I couldn't tell the difference, but then I wasn't able to compare them side by side, only reboot-after-reboot).

Incidentally, does your splash screen display messages about the boot process? Mine did in Dapper (where the spash screen worked without any kernel parameters), but it doesn't anymore since I upgraded to Edgy. It just shows the Ubuntu logo and name. I'm trying to figure out if this is a bug in Parallels, a bug in Edgy, or a bug in the way Dapper upgrades to Edgy.

One more note: you suggest that users change the #defoptions line in /boot/grub/menu.lst and then make the same changes to the active kernel around line 113. But the usplash customization howto recommends running "sudo update-grub" instead of editing your active kernel, as "sudo update-grub" will apply the same changes to any future kernel as well, whereas edits to your active kernel will break when you update to a new kernel (and the changes to the older kernel will probably also get lost).
 
About the splash screen: the difference between vga=792 and 791 is the number of colours, which is immaterial here since the splash screen uses just a few colours. So, 791 is sufficient, and so is 792.

No, my splash screen doesn't display any messages either, and nor does the splash screen (in grey tones this time) on my AMD64 box.

About editing menu.lst: if you edit both the active kernel options and those in the template starting with a single #, that would be the same as using update-grub. So, choose whatever way you feel comfortable with.:)
 
Back
Top