Tyler Bird If you're into DevOps, have I got a blog for you... hint: it's this one.

Parallels and Ubuntu 7.10 Server

I’ve been reading Deploying Rails Applications beta book and it’s been a blast to learn how to put together a Rails stack on a *nix based server.

I watched topfunky’s video on building a deployment server with Parallels and Ubuntu Desktop. It looked great, but I wanted more of a challenge. Not too much more, just a smidge. So I decided I’d go with Ubuntu Server package instead. Go GUI-less or go home!

After downloading the ISO, I get everything in the Parallels VM setup just like it would be if I got a slice at slicehost.com (one of the VPS providers I’m looking at) to give me an idea of how much storage it would take to build a Rails stack on Ubuntu Server.

I boot to the ISO, set everything up how I want, and reboot to a stark, black screen with the words:

Kernel panic: CPU too old for this kernel

My dreams dashed, and my hopes gone, I was defeated. Until… I remembered that Google exists and I looked up the error message.

Cut To the Chase

My “cut to the chase” brand walk-throughs make more assumptions than your average walk through and give you only what you need to fix a specific problem.

Here’s what we’ll assume you have done:

  • Installed Parallels (build 5584).
  • Created a Ubuntu VM with 256 MB ram and 10240 MB (10 GB) hard drive with Shared Networking (so your VM can use the internet your host has).
  • Booted to the ISO and installed the defaults for the Ubuntu Server.
  • You’ve rebooted your VM computer.
  • And you got the error message I did.

The Fix Is In

You’ll need boot back into the ISO you downloaded, except now the VM machine wants to boot from the hard drive first. On a real life computer you’d set the BIOS to change the boot order. You’ll have to do that in the VM way by editing the settings.

  1. With your VM open and the machine stopped, click on Edit / Virtual Machine.
  2. The Configuration Editor window appears and on the right hand side is three tabbed options. General, Booting and Advanced.
  3. Choose Booting.
  4. Change the boot sequence to CD-ROM, Hard Disk, Floppy.
  5. Click OK.
  6. Start your VM.
  7. From the Ubuntu boot menu, choose Rescue a broken system.
  8. Follow the prompts to setup the system. I usually do NOT allow it to detect my keyboard because it’s a painful process that never seems to get the right keyboard. I just set the keyboard manually and you’re through that step sooooo much faster.
  9. Set your host name, if you want, to what you set it as when you created the computer. It’s not really that important. What is important is what is next.
  10. When you get to the Enter rescue mode dialog, you’ll want to choose /dev/sda1 as your root file system.
  11. Then under Rescue operations, choose Execute a shell in /dev/sda1.
  12. From the shell run each of these steps in turn:

apt-get update apt-get install linux-386 apt-get remove linux-server

This will first get the latest links to the current versions of the packages to install (apt-get update) and then you install the latest linux-386 kernel (apt-get install linux-386). You remove the linux-server because this site told me to and it worked (apt-get remove linux-server).

Reboot and enjoy the sweet fixed-width font goodness of white text on a black background!

Then go and buy the Deploying Rails Applications: A Step-by-Step Guide beta book from the Pragmatic Programmers and follow the steps on how to create your own VPS Rails stack on Ubuntu (chapter 4).

Oh and btw, its about 1.26 GB total once I setup Rails and MySQL, etc. Lots of room for production logs, database files, and bears, oh my!  So it can host a small to medium size rails site.  Have fun!

KTHXBBQFTW!