Every few months, I decide to install a newer version of Oracle’s VirtualBox on my laptop. Usually, this is really easy and everything goes well. Whenever I load up a new clientOS, I have to remember all the dependencies required to get the guest additions to compile and link. I always forget something or end up doing it a less-than-perfect way.
New Desktop OS
About a month ago, I switched to using Ubuntu Srv 12.04 with LXDE environment. This was a fresh OS load, not an upgrade, so I had to figure out which dependencies were needed … again. It appears I didn’t do it the best way.
The way I discovered the problem was after a kernel update, the mouse stopped working well, the desktop resolution was wrong (very low) and a mount using the vboxsf driver for the hostOS didn’t work. It was a bad day here. Multiple attempts using
sudo mount -t vboxsf D /Data
all failed with a less than useful error. It was only when I looked for the vboxsf kernel module and did not fine it, that I knew what the underlying problem was.
I need to add an warning to my mount script for this module. Perhaps this script will work added to the /etc/rc.local?
if [ ! -d /Data/temp ] ; then
GOT=`lsmod | grep -c vboxsf`
if [ 0 -eq $GOT ] ; then
echo “ERROR – vboxfs kernel module not loaded – new guest additions needed?”
echo "Mounting vboxfs …$GOT "
mount -t vboxsf D /Data
The Fix – Missing Headers
$ sudo apt-get install linux-headers-generic-pae
I’d used the specific headers for the exact kernel instead of this meta-package. The meta-package is better, since any kernel upgrade will include new headers and we need those.
As you can see, I’ve been lazy twice today.
- installing the meta-package so I don’t need to remember to install the specific Linux Kernel headers anymore
- wrote a tiny script to check for a common problem and forced it to run during every boot sequence.
For any administrator, lazy is good.