Ubuntu 10.04 Server VirtualBox Guest Additions Installation

I had some trouble installing VirtualBox Guest Additions on Ubuntu server on my Mac. I had to do the following:

From MacOS:

cp /Applications/VirtualBox.app/Contents/MacOS/VBoxGuestAdditions.iso ~

Attach the iso file above to VirtualBox.

As root on the Ubuntu system:

mkdir /mnt/cdrom
mount /dev/sr0 /mnt/cdrom
apt-get install gcc
/mnt/cdrom/VBoxLinuxAdditions.run