Ubuntu Server Update

| Comments

I posted a while ago about switching to Ubtuntu for my home server.

I’ve got the basics up an running on my MacMini (artemis). Namely DHCP for the home network, DNS primarily as a caching DNS server and WWW for hosting my wordpress steup.

The setup of DHCP was easy enough. Followed the find documentation on the Ubuntu site. Same story for a caching DNS.

Setup Apache/PHP/MySQL was a quick ‘sudo apt-get install php5-mysql’ and I installed Wordpress via subversion checkout. I’ve also installed BIND9 as a caching DNS server.

Some services I’m not bothering to migrate:

So all in all a success switching to Ubuntu.

Now onto my wish list:

IntelliJ IDEA Ubuntu Launcher

| Comments

I’ve been using IntelliJ on Ubuntu 10.10 lately for work and rather than starting things from the terminal I wanted a pretty launcher in the top menu.

After a quick search I found this site:

IntelliJ Ubuntu Launcher

Following the instructions yielded a pretty launcher to sit in my top menu bar.

The only improvement I could add is to have an /opt/intellij-current directory and use

sudo ln -s /opt/idea-IU-99.18 /opt/idea-current

to redirect it around to point to the current version of IntelliJ you have.

Leaving OpenBSD For

| Comments

I’m migrating my home server away from OpenBSD.

The things I was able to setup in OpenBSD have worked very well. Things like DHCP, DNS and SQUID have worked excellently. I found some fantastic guides on http://www.kernel-panic.it/openbsd.html that allowed me to get everything up and working in no time at all. I wont bother posting any details from my setup it’s better to just visit that site and decide which pieces you want.

Why move away? These are surely very personal reasons to make the switch and are not a general condemnation of OpenBSD which is still a fantastic piece of software.

  1. I wasn’t able to get DHCP & DNS to dynamically update DNS when a new host was added to the network. Instead I had a whole heap of static mappings for computers. Not an ideal situation!

  2. The upgrade path for OpenBSD confuses me. When a new version comes out how do I upgrade without nuking all my local configuration? I really don’t want to go back through the setup every 6 months when the BSD guys bring out a new version.

  3. I wasn’t able to get PHP + MySQL + Wordpress to play nicely together. Not being a PHP person I didn’t really grok how to setup the whole thing so I was forced to follow guides written by others. OpenBSD doesn’t really seem to be a Wordpress/PHP platform of choice for many so I struggled to find accurate docs on what to do.

  4. I wanted to add new services to the server like Ruby/Rails, Java/EE, Python/Django and Erlang/OTP. Doing all this and keeping it current on OpenBSD is more work that I was willing to expend.

So the solution I’m turning to is Linux and specifically Ubuntu in all it’s glory.

What a spiffy system Ubuntu is? I remember struggling to install Debian way back when but Ubuntu is a pleasure and perhaps a little too easy. Kids these days don’t need to struggle for hours setting up XFree86 or a dodgy network card.

So over the next few weeks I’m migrating the essential services, DHCP, DNS and SQUID to Ubuntu. After that I’ll get a bit funky and start adding this blog on there and other bits and pieces.

Hooray for Ubuntu!!

Thoughts on ObjectiveC and Cocoa

| Comments

I wanted to collect my initial impressions of ObjectiveC and Cocoa. I’ve started reading the Hillegas book again after and interrupted start last year with the goal of doing a lot more osx coding in the future.

The things I’m enjoying most about the language are:

The downsides so far are limited to manual memory management within ObjC. Granted there is a garbage collector on OSX but not on iPhones etc, so the common wisdom seems to be you need to know how to use both. I don’t see this will be an insurmountable problem as I managed to learn it for C++ which was a much larger language.

The Hillegas book I’m using is brilliant but what would you expect from a guy that has run training course on the subject for so long. The book does feel like running through a training course but one run by a guy genuinely exciting about the subject. My only wish is that there was an equivalent for the iPhone / iPad.

.emacs Publishing

| Comments

I signed up for a BitBucket account earlier this month but I’ve only recently got around to using it. My first public project is my .emacs file. Check it out at lambda_foo/.emacs.

Includes partially working setup for:

The whole config is split into individual lisp files that are specific to a language or cross cutting feature. The inspiration for doing this work came from M-x all-things-emacs

Declaring .emacs Bankruptcy

| Comments

Well really this is a post bankruptcy posting!

What? Cleanup .emacs file impossible you say. It must gather sediment like sandstone until you have a tremendous hard packed conglomeration of ideas, never daring to change something unless it breaks and not knowing if it worked in the first place.

The Motivation: Messy configuration file, no organisation, unused configuration/modes.

The Solution: Remembering a link I archived in delicious some time ago, I revisited their ideas.

What I got was a very short .emacs file that only has some Load Path additions and a heap of require statements for each customisation broken down into modes or languages.

I really like this because it’s quite simple to add a new mode or customise and existing one. Plus moving between Mac OS, Linux and BSD is a breeze, and sharing a config file for a particular mode is soooo much easier.

I highly recommend doing this sort of clean up to your own .emacs. After all who doesn’t like an organised workspace!

Original motivation here: http://www.emacsblog.org/2007/10/07/declaring-emacs-bankruptcy/

eBook Thoughts

| Comments

I’ve become a convert to the whole ebook thing recently, but only in a limited capacity.

I still like having a paper book for most things I read like history and fiction. The real value comes from replacing all those technical books that you buy, like Java EE in 5 days.

There is a small subset of all the technical books I have that I really want a paper copy of. Stuff like my Operating System books that you cannot get anymore or are nice to have sitting on the bookshelf. But in general technical books date so quickly that if you’re looking at something more that a year and a half old it’s pretty much useless. The same goes for buying new book, I’ve started asking myself the question Am I going to read this in the next 6 months? if the answer is no then I don’t get the book. The only value in buying a technical book lies in actually learning the content of it, not in decorating your bookshelf.

Looking at my current bookshelf, there is probably half or more books that are severly outdated and aren’t any use in their current form. I’m currently in the process of thinning out their numbers.

What I’m planning on doing in the future is grabbing an eBook reader (and using my MBP) and keeping all my technical books there. Basically treating technical books more like magazines or newspapers, not that I really buy either of those anymore.

NetBSD 5.0 on an AspireOne 110L

| Comments

After trying Ubuntu Linx on the AspireOne for a few months, I wanted to branch out and try something a bit different. Linux is so main stream theses days, I only had to mess around with the wireless. Far too easy. Why back in my day we entered our X11 config on punchcards!!!

Anyway, my options were either OpenBSD or NetBSD.

I’ve wanted to try OpenBSD on the desktop for ages, but being a bit fresh at the BSDs I decided to go for NetBSD. It was a bit less daunting and there are more online resources for NetBSD. But there is still something about OpenBSD, I’m sure I’ll get around to it soon.

So I started off with downloading the ISO images for the latest NetBSD release 5.0. The latest release of NetBSD includes improved ACPI support and the ath(4) wireless is (apparently) supported. Plus all the other goodies mentioned in the release notes.

NetBSD Install

NetBSD has a basic terminal based installer, anyone with some Unix experience should be comfortable and even without any experience, just reading the installer guide should get you a working system.

My AspireOne 110L came with:

No CD drive meant that I needed a bootable USB drive. I followed these basic guidelines. Since this page was written for 4.0 some of the steps are different.

Step 7. change the url from

ftp -a ftp://ftp.netbsd.org/pub/NetBSD/iso/4.0.1/i386cd-4.0.1.iso



At Step 9 change it to look like this:

mount /dev/sd0a /stick
cp /image/i386/binary/kernel/netbsd-FLOPPY.gz /stick/netbsd.gz
cp -R /image/i386/binary/sets /stick/sets
umount /stick
rmdir /stick

I’m not sure I used the correct kernel here, the name suggests a bootable floppy kernel rather than the normal install kernel. I tried the netbsd-GENERIC.tgz but it started looking for things like “init” and “/etc/rc” which didn’t seem right so I went back to the other kernel.

After I had the bootable USB setup correctly I rebooted the Aspire and started the install. Initially I tried following the instructions on installing from the sets copied onto the USB stick but the installer couldn’t find them. So In the end I went for the HTTP install (Figure 3.20 from the Install Guide), a few hours later the installed finished. Rebooting the system brought this greeting:

Last login: Mon May 18 22:09:59 2009 from
NetBSD 5.0 (GENERIC) #0: Sat May 16 18:00:22 EST 2009
Welcome to NetBSD!

After poking around for a bit the 2 main outstanding issues are: X11 Setup and Wireless.

X11 Setup

Here the NetBSD docs are really lacking, they still explain how to configure XFree86 which is a complete pain. Instead NetBSD is shipping with Xorg, providing a vastly superior configuration experience.

Simply run X -configure as root. Nice!

It’ll dump an xorg.conf.new in root’s home directory.

To test the server with this file, run X -config /root/xorg.conf.new.

And if you’re happy with it copy it over to /etc/X11/xorg.conf.


The ath(4) driver doesn’t attach correctly with the default GENERIC kernel, so some customisation is required. Apply this patch:


Recompile the GENERIC kernel and reboot.

All the steps are documented here:


After a reboot it’s recognised:

 ath0 at pci3 dev 0 function 0
 ath0: interrupting at ioapic0 pin 18
 ath0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
 ath0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps

Things to fix up

Installing NetBSD and getting productive certainly isn’t the seamless process that Ubuntu was. So there are a few minor things that need a bit of fixing.


Forcing Snow Leopard to Use 64bit Kernel

| Comments

How to force Snow Leopard to boot the 64 bit kernel, cause we all want to run the latest 64 bit goodness from Apple.

Open the file


with something like TextEdit and add arch=x86_64 to the Kernel Flags string:

<key>Kernel Flags</key>

This is posted just about everywhere, and is really only added here for my convenience.


| Comments

Since I haven’t posted anything here for a while. I wanted to give a quick update on what’s going on.

My new Unibody MacBookPro is brilliant. I just missed out on the latest update with the inbuilt battery, but I don’t feel I have missed out on much. I wouldn’t use the SD reader but the extra battery life would be very nice. Either way I’m happy, I have more power than I need and it’s a beautiful piece of engineering. Mmm.

Since finishing off University for the semester I’ve really gotten into Objective-C / Cocoa programming for the Mac, and maybe the iPhone. I grabbed Cocoa Programming for Mac OSX which seems to be the standard book on the subject. So far I really like the book, it’s a bit different in that you really cannot just sit down and read through it, instead you need a Mac handy and a spare hour or so to get hands on with the material. On reflection this is the natural format for someone like Aaron Hillegass, who runs training courses on this stuff. My approach so far has been to read a chapter or so on the train in the morning and work through the exercises in the evening. I’m making pretty good progress and I can really see why people get excited about Cocoa UI development, you can get a lot working with very little code. I’m maybe a third of the way through the book and given my pace I’ll be finished within 2 weeks.

Alongside the Cocoa book, I’ve started downloading the iPhone Application Programming Videos from Stanford, via iTunes. The contrast with the heavy hands on approach of Hillegass is nice, meaning I can sit back and take things in slowly.

Maybe I’ll become an Objective-C hacker?