rc3.org

Strong opinions, weakly held

Tag: Linux

The leap second bug

Nelson Minar has a nice, short writeup of the Linux kernel bug that caused servers to spin out of control yesterday. Most initial write-ups blamed Java, but that was incorrect. Interestingly, Java not only accounts for leap seconds, but also mentions them prominently in the documentation for the java.util.Date class:

Although the Date class is intended to reflect coordinated universal time (UTC), it may not do so exactly, depending on the host environment of the Java Virtual Machine. Nearly all modern operating systems assume that 1 day = 24 × 60 × 60 = 86400 seconds in all cases. In UTC, however, about once every year or two there is an extra second, called a “leap second.” The leap second is always added as the last second of the day, and always on December 31 or June 30. For example, the last minute of the year 1995 was 61 seconds long, thanks to an added leap second. Most computer clocks are not accurate enough to be able to reflect the leap-second distinction.

As Nelson notes, time is complicated. Further evidence of this fact is provided in Noah Sussman’s post Falsehoods programmers believe about time and his followup.

Quotable: Mohammad Sephery-Rad

Mohammad Sephery-Rad, minister of Iran’s High Informatics Council, on replacing Windows with Linux for reasons of security:

All the software in Iran is copied. There is no copyright law, so everybody uses Microsoft software freely but we cannot continue like this much longer.

Apparently Iran is also seeking admission to the WTO, which would require them to respect international copyright laws.

Installing Ubuntu on OS X

Today’s experiment was to get Ubuntu Linux running in a virtual machine on my Mac. It gave me the opportunity to play with two things — Ubuntu Linux and VirtualBox, an open source alternative to VMware and Parallels.

First step: download VirtualBox and Ubuntu. Second step: wait four hours.

Like all the virtualization tools for the Mac, VirtualBox is an installable package, not just an application you drag to your Applications folder. (It has to install a kernel extension.) Installation is easy, as is creating your virtual machine. You name the VM, indicate which OS you’re going to install on it, and then assign it some memory and a virtual disk image. It supports expandable disk images, so you can start out small and grow the image as needed.

Starting up Ubuntu was easy. VirtualBox makes it trivial to mount an ISO, so I just had to point it to the downloaded ISO, and click on the start button. The Ubuntu live CD starts up, and there’s an installer icon right on the desktop. I ran the installer, pointed it at the virtual hard drive I’d created, and let it rip. It took a few minutes to install the files, I rebooted, realized I had left the ISO mounted, rebooted again, and the entire process was complete.

The whole process took a few hours, but I didn’t have to spend more than a few minutes of attention to get a virtual host running Ubuntu set up, and all with open source software. Now I’m anxious to create Windows virtual machine using VirtualBox. It certainly seems as easy to use as VMware, and the only problem I’ve seen is that it seems a bit more eager to eat up CPU when it’s in the background than VMware is.

As far as Ubuntu goes, I haven’t installed any Linux distribution in a couple of years, and I was shocked to find that the installation process is basically Mac-like. Linux has come a long way since you had to spend hours trying to get X to run your monitor at the correct resolution.

One question I don’t know the answer to is how Ubuntu and my dynamically resizable partition will play together. If I need to grow the partition beyond the initial 8 gigs, will I be able to do so transparently or will I need to use some Ubuntu tools to let it know about the larger partition?

Update: Coolest VirtualBox feature — when you have a VM open, its Dock icon becomes a snapshot of the VM’s desktop that updates in realtime. Yeah, it’s silly eye candy, but it’s still awesome.

© 2018 rc3.org

Theme by Anders NorenUp ↑