# Ubuntu server in VirtualBox



## neolix (Sep 24, 2013)

Hi guys,

I am attempting to install Ubuntu server 12.04 LTS on a headless FreeBSD 9.1 server through the VirtualBox CLI. I have virtualbox-ose-4.2.18 installed and the Ubuntu server setup goes well up to about 70% of the installation when it attempts to install the kernel package "linux-generic-lts-raring" where it fails. It specifically fails when it is looking for kernel header files. It seems some Ubuntu users have encountered this before, particularly when upgrading and the solution is to install the latest kernel header files (e.g. apt-get install linux-headers-2.6.32-34). 

My question is then how am I supposed to get this header package when I am on FreeBSD? Has anyone succeeded with installing Ubuntu in VirtualBox? I would have assumed my server image file (from the Ubuntu site) would have everything I need.

Any thoughts are appreciated.


----------



## SirDice (Sep 24, 2013)

The issue will need to be resolved on the Ubuntu side.


----------



## neolix (Sep 24, 2013)

Thanks @SirDice, I'll check with the Ubuntu side and see what I find out.


----------



## _martin (Sep 24, 2013)

neolix said:
			
		

> My question is then how am I supposed to get this header package when I am on FreeBSD? \.



As @SirDice suggested, problem is on Ubuntu side. Note it doesn't matter what host you are using to run VirtualBox on, this issue is solely related to virtual machine (VM) .. in this case, Ubuntu.

What is it failing on though?


----------



## neolix (Sep 24, 2013)

Thanks @matoatlantis, if I figure this out on the Ubuntu end I'll post the solution here.

It's failing to find the kernel headers. I would assume the image file has everything it needs in it to complete the installation which is why this is a bit baffling.


----------



## neolix (Oct 1, 2013)

Having failed with Ubuntu 12.04, I tried Ubuntu 12.10 with the same results. I then tried CentOS 6.4 which also failed. However all my errors had their root in a segfault in the cdrom while loading files for install. I eventually succeeded with a net install of CentOS 6.4. I have not tried an Ubuntu net install but I think it would also work. 

Ultimately I think it was failing because the installer was running out of memory. Initially I was assigning 512MB for the vm which seemed adequate for a text install on a headless server but it seems memory use during install is an inexact science  I eventually gave the vm 2GB. Additionally I hypothesize the dvddrive in the vm was somewhat unstable because increasing memory for an iso install did not solve the problem. Lastly I tinkered with the settings while looking for a solution and in the end got it working with nested-paging turned off. It is likely my 64bit xeon processor supports nested pages but I know Intel introduced it after certain models (I did not bother to confirm).

And while I am on the topic of VirtualBox, a big thank you for the devs that ported and continue to maintain the FreeBSD port!


----------

