Wednesday, 08 October 2008
That's what the gods are! An answer that will do! Because there's food to be caught and babies to be born and a life to be lived and so there is no time for big, complicated, and worrying answers! Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be.
--Mau, in Terry Pratchett's Nation
Tuesday, 07 October 2008
We all have our time machines. Some take us back, they're running Ubuntu. Some take us forward, they're running OpenSolaris.
Sorry Jeremy, I couldn't resist. And my apologies to you as well, gentle reader, if you came here looking for the current state of affairs on OpenSolaris vs Ubuntu. One of these days I should write up my personal perspective on where things stand. Unless, of course, I can convince some folks to do an "I'm a Mac, I'm a PC"-style smackdown, which would be infinitely more entertaining. Assuming that will not come to pass.... For now suffice it to say that while we're not quite "there yet" with OpenSolaris, every day brings me a bit closer to concluding that my bastardized quotation ain't so far from being the truth.
But that's not what this entry is about. It's about time, plain and simple. Or, rather, not so simple as I discovered.... With a hat tip to Rich who always concludes each of his technical exercises in frustration by sharing what he's learned for the next poor soul who floats in on the same boat, I present to you what I've worked out thus far about time in a dual-boot Ubuntu/OpenSolaris environment:
- Ubuntu insists on setting your hardware clock to UTC. It doesn't matter if you didn't want your hardware clock set to UTC. Nor are you asked if you might want to switch away from the local time in favor of UTC -- unless, you happen to be using the alternative installer. Sadly, odds are that you are not: If you're using the user-friendly, graphical, "live CD," you are NOT using the alternative installer.
- Theoretically, the Ubuntu installer looks to see if you're in a dual-boot environment. If it concludes that you are, it is designed to not engage in its default time "correcting" behavior. This would suggest that installing OpenSolaris prior to Ubuntu would solve the problem. Alas, it does not. Trust me.
- I have been informed that "UTC=yes is the correct and sane default" If you're wondering what the advantage of it defaulting to yes happens to be, as I was/am, I'm afraid I couldn't tell you. (UPDATE, see below.) I truly believe that there is indeed a good reason -- feel free to add it in the comments for my edification -- but the fiat was all I got. Well, that and the fact that Ubuntu detects dual-boot installations ("albeit not always quite as often as you'd want." Indeed. See previous item.). Oh, and the suggestion that I "can always change it." Which brings me to:
How DO you change whether or not the hardware clock is set to UTC or the local time post-installation? You'd think (or at least I thought) you would be able to do so through the Time and Date Settings dialog, part of gnome-system-tools. Were that the case, there'd be a uniform (and hence more user-friendly) way to adjust this option in Ubuntu and OpenSolaris because both use the GNOME desktop and, therefore, both include g-s-t's Time and Date Settings dialog.
Of course, you could bypass the whole UTC vs. local timezone issue and use g-s-t to set up synchronization with an NTP server in both Ubuntu and OpenSolaris.... That's actually what I wound up doing last week. BUT what if you don't have a network connection at the moment? Besides I wanted an answer; not a workaround.
I was going to open an RFE against g-s-t -- I'm envisioning a "My clock is set to UTC" checkbox -- but someone beat me to it. Two years ago. It hasn't been closed as WONTFIX, but no action seems to have been taken either.
- So how do you change it in Ubuntu then? Well, some googling led me to the answer: Edit /etc/default/rcS. Just set UTC=no. Once you know this magical tidbit, it's all good: A few seconds' worth of editing and Ubuntu stops stomping on the time, OpenSolaris doesn't keep having the time changed on it, and you cease to send email to folks from four hours into the future.
In other words, if all you want to do is cause your blessed environments to stop waging war over what time it is, this is all you need to do. And there was much rejoicing. Yea. But what if you want to change it in OpenSolaris instead? At this point answering this question was/is admittedly merely an exercise to satisfy my curiosity. That said.... After some more googling.... It seems that you can use rtc for this purpose:
pfexec /usr/sbin/rtc -z UTC
is all you need. Once again, Ubuntu is happy (this time because it can continue stomping along on its "correct and sane" path
), OpenSolaris is happy (because its time now jives with the hardware clock), and your friends no longer have any reason to suspect you've mastered time travel. At least not until you adjust the timezone via g-s-t. Doing so causes /etc/rtc_config -- the file you corrected via rtc -- to be updated and you're back to Ubuntu and OpenSolaris fighting again.
Should g-s-t be modifying /etc/rtc_config?? I honestly don't know, but life seems like it might be easier if it didn't, so I filed a bug against OpenSolaris. *shrugs*
Now if you would be so kind, answer me this: Why is it so much work to (figure out how to) configure something as simple and trivial as the time in a dual-boot environment? Shouldn't it JustWork™?
UPDATE: This morning Colin Watson began addressing the bug I filed regarding the Ubuntu Live CD's installer failing to set UTC=no in a dual-boot Ubuntu/OpenSolaris environment. He even took the time to provide me with a useful reference/link:
If you're unfamiliar with the reasons why keeping the hardware clock in local time is a bad idea, please read:
Thanks Colin!
Wednesday, 01 October 2008
Taken one month (almost to the day) before the start of what we may come to think of as the "Great Depression - Take 2":
Note to self: In the future, when giant red warning signs present themselves, don't laugh; pay attention.


