Building a Hackintoshed Netbook

Last weekend, my Thinkpad was having some trouble. Its battery was shot, the DVD drive was beginning to sound like a jet engine, and my hard drive was getting Disk I/O errors. In the weeks before that, I had started doing some Mac development with PyObjC, and I was wanting to get a machine in order to do some testing.

I looked into getting a netbook and installing OS X on it. The Dell Mini 10v, in particular, was known to work very well with OS X, at least with Leopard (Snow Leopard has since been known to work as well). I also looked into grabbing a Mini 9 (now known as the Vostro A90) and upgrading it to a 32GB SSD and 2GB of RAM. It would have come up to around $500. I decided to sleep on it and make the decision in the morning.

I wound up going out and walking around the Marina later. Guess what neighborhood it turns out has an Apple Store?

I wandered in and started to play with a 13″ Macbook Pro. Two hours later…

Oops.

Why you should insure everything

Last week, I got a call from my roommate who is currently living at my house in Louisville.  He had come home to find the house broken into and quite a few things missing, among them my TV, PS3, Xbox 360, and Wii. Fortunately, my custom built desktop computer was left behind, probably due to it being so heavy.

Unfortunately, I’m basically hosed with respect to what they did take. I had never bothered to get renter’s insurance to cover my electronics, nor did I have the serial numbers to my consoles backed up anywhere to give to the police. Obviously, this will all change for me, but you can avoid having to learn this the hard way, and for relatively cheap.

If you rent a house or apartment, look into renter’s insurance. It’s relatively cheap (probably around $10/month) and will cover your belongings if they are stolen.

Secondly, keep a record of your electronics’ serial numbers. I’ve started using Evernote for this, as any information in Evernote is synced to their servers.  Without a serial number, your chances of recovering stolen property can drop dramatically.

Finally, back up your data off-site. I was lucky enough to not have my desktop computer taken, but if it had been, that would have been several hundred gigabytes of media gone. There are a couple of easy ways to protect yourself against that. The easiest is to use a service like Carbonite, which gives you unlimited off-site backup of your data for around $50 a year. If you’d rather not pay someone to host your data for you, you can buy a couple of external hard drives and back your data up to them, but you need to be sure to store that backup in a different location that your computers, whether that’s leaving it at a friend’s place, or storing it at your office at work.

As it stands now, I’m stuck paying around $1200 if I want to replace what I lost, but if I had bothered to insure my possessions, I could be paying a $250 deductible instead.

Building a Development Environment with VMware

Today, I decided to try and start back up with Palm webOS development (which I’m further putting off by writing this post) but before I could do that, I needed to set up my development environment. This time, rather than install it in my host operating system, which can change fairly often, I decided to create a dedicated virtual machine to do all of my webOS development in. There are a couple of advantages of this. First, my development environment remains stable and constant even when my host operating system changes or is upgrades. Secondly, I can have a 32 bit development environment when the rest of my desktop is 64 bit. This is helpful, because Palm currently only provides an i386 *.deb for the Mojo SDK, and while you can get it to work on a 64 bit system, I can avoid having to do these workarounds. Finally, it’s easy to pick up my entire development environment and take it with me from computer to computer, without having to worry about redownloading and libraries or tools on the new machine.

Since I’m using Ubuntu 9.04 x86_64 edition, most of this guide is tailored to Linux hosts, but should work fairly well on Windows or Mac hosts as well.

1. Install a Virtualization Platform

The first step was to set up my virtualization software. If you don’t already have something installed to do this, take a look at VMware Player 3.0, which is currently in the RC stages. You can get it here. Player 3 is improved over the previous versions in that it is now a fully fledged desktop virtualization product. In the past, it was only able to run virtual machines others had created, but it is now capable of creating them as well.

2. Install your Guest OS

Once you have VMware set up, you need to install your guest operating system that you will do your development on.  For my example, I chose to use Ubuntu 8.04.3 LTS, which is an older release, but is an LTS release and also the version that Palm has targeted its SDK at.  After downloading the image from http://releases.ubuntu.com/hardy/ setting up the virtual machine is very easy. All you have to do is create a new VM from Player’s UI, and give it the Ubuntu *.iso image when it asks for it. VMware will automatically set up the VM for you from there, including installing Ubuntu.

3. Set up your Environment

Next, just set up anything you need for the development you’ll be doing. In the case of Palm’s Mojo SDK, this means installing sun-java6-jre through apt, then installing the palm-sdk and palm-novacom packages from Palm’s webpage. You can also install an SDK if you prefer. I installed Eclipse 3.4.2, which was the version recommended by Palm. I then added the Palm and Aptana plugins.

4. Set up Remote Access

Finally, you can configure your virtual machine to be accessible remotely. The best way to do this (for a Linux guest) is via SSH. Install the package openssh-server in your virtual machine, then you can access it from your host through that. If you configure VMware to leave virtual machines running in the background you can close out of Player then run your IDE of choice over ssh by running something along these lines:

ssh -X user@vmipaddress /path/to/ide

which for my particular setup, winds up being:

ssh -X zach@172.16.156.129 /opt/eclipse/eclipse

You can save that command as either a bash alias or shell script, and make a launcher for it. Eclipse will then load up and run looking just like a native application, but it’s actually still keeping everything in the virtual machine, so you can still bundle up your entire environment easily.

There are some additional tricks you can do to futher integrate guest and host. One such thing that can come in handy is mounting your host’s hard drive in the guest via sshfs which will let you easily move files between guest and host.

Hopefully this will help you keep your development environment clean and stable, no matter how much you decide to tweak your host ;)