Revision of Making Ubuntu Server Work in VirtualBox from Wed, 09/05/2007 - 18:45

VirtualBox is open source virtualization software similar to VMware. I wanted to run a virtual Ubuntu LAMP server for testing, but I ran into a problem with VirtualBox.

Ubuntu Server has its own kernel which has PAE (physical address extension) support. This is not supported in VirtualBox and prevents the virtual Ubuntu from booting. Using Ubuntu’s recovery mode it is possible to install another kernel which will work in VirtualBox.

After installing Ubuntu server in the virtual machine, boot off the CD again and select the Rescue a broken system option.

Ubuntu Server in VirtualBox

Answer the various language and keyboard questions when you are prompted. After the installer detects your hardware it will ask you to select the root file system from a list. For me, the root partition was the first one in the list. Then select Execute a shell in [partition]. Select continue and the shell will start.

Ubuntu Server in VirtualBox

Run these commands to download the package list, install a new kernel, and remove the non-working server kernel:

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

Close the shell by typing exit and selecting Reboot the system. Enjoy your virtual server!