2009/07/31

Troubleshooting VirtualBox 2.1.4 Guest Additions (Ubuntu 9.04 guest)

I had a little fun trying to figure this one out today and it seems as though there wasn't any updated instructions on how to get the Guest Additions running in an Ubuntu 9.04 VirtualBox (Kubuntu 9.04 more specifically, but these directions will apply to all flavors of Ubuntu 9.04).

First of all, I'm running (as stated, but just for clarification) VirtualBox 2.1.4 on host: Ubuntu 9.04 and the guest is Kubuntu 9.04 (also verified it on Ubuntu Studio 9.04).

Here are some of the errors you may be getting:

(EE) Failed to load module "vboxvideo" (module does not exist, 0)
(EE) No drivers available.
Or
(EE) module ABI major version (1) doesn't match the server's version (5)
(EE) Failed to load module "vboxvideo" (module requirement mismatch, 0)
(EE) No drivers available.

...among the other log info. If you are getting either of these (or something similar, i.e. different version numbers than what is shown above), then you are in the right place! Maybe.

These errors should only appear (as far as I know) after attempting to install the Guest Additions into an Ubuntu guest machine or, as other people have reported, possibly also when adjusting the display resolution in the guest machine. The reason the error arises is because the additions modify your xorg.conf file with some new/modified entries in an attempt to enable to appropriate VBox modules for video and mouse support as well as the clipboard support (I think that part is included in the mouse driver).

So here's the solution. We'll assume you have already tried at least once to install the VBox guest additions and have attempted to reboot to finalize the changes as it instructs you to. When you booted back up you most likely wound up with a black screen, or a tty login prompt (in the case of Kubuntu), or the following message (as in the case of Ubuntu standard/Studio):

In any case, just ignore the error message if any and try get to a tty (try Host+F2 if you're having trouble) where you should be able to login normally. Once in, we'll need to mount the guest additions ISO and run the guest additions installer again, with a twist.

mount /dev/cdrom
cd /media/cdrom/
sudo mkdir /tmp/ga
sudo ./VBoxLinuxAdditions-x86.run --noexec --target /tmp/ga

It should do a quick dump of the driver files to /tmp/ga. Next, go ahead and check your X Server version:

dpkg -l xserver-xorg-core

You should see something like:

The part we're interested in is just the digits from the version number (2:1.6.0), in this case a 1 and a 6. This is important to determine which drivers to use later. Now, go ahead and execute these commands:

cd /usr/lib/xorg/modules/
sudo cp /tmp/ga/vboxvideo_drv* drivers/
sudo cp /tmp/ga/vboxmouse_drv* input/
cd drivers/
sudo ln -s vboxvideo_drv_16.so vboxvideo_drv.so
cd ../input/
sudo ln -s vboxmouse_drv_16.so vboxmouse_drv.so

Important: notice that the number highlighted above represents the version number we got from dpkg -l earlier? Make sure the numbers you enter match your version as well so the correct files are linked, or you will get errors starting X again. We copied all of the driver files just in case we need any of the others at a later time (i.e. if you upgrade your X Server), but you really don't have to. At this point I usually do a ls -l on the input and drivers directories to make sure I linked to the files properly.

Once you've completed these steps everything should be fixed, and we didn't even need to touch xorg.conf! Go ahead and try starting X with startx. If everything went well it should start right up. You may want to reboot just for good measure, though it's probably not necessary.

If everything is running now, save a snapshot and you're done! You now have your Ubuntu 9.04 guest OS running with VirtualBox Guest Additions installed, and a much nicer resolution to boot.

If you encounter mouse integration issues, continue with this post.



Install guest additions on Ubuntu (VirtualBox)

Just a quick how-to for installing the Guest Additions for VirtualBox in an Ubuntu 9.04 guest machine. These instructions are specifically for VirtualBox 2.1.4 but should also work with later versions of VirtualBox (and possibly earlier versions as well, with slight variation).

First of all you need to have a fully installed copy of Ubuntu 9.04 (or any of it's variants) in VirtualBox. If you do not, please complete that before continuing. I recommend also letting your guest Ubu do a full update if possible before moving on.

Save a snapshot now before attempting to install Guest Additions!

Once you have installed your guest Ubu and saved a snapshot of the virgin install, you'll need to first release your mouse by pressing the Host key, then go to your Devices menu and select "Install Guest Additions..." This will mount the ISO for you under /media/cdrom0.

Open up a terminal, or switch out of X Windows to a tty and log in. Go ahead and
cd /media/cdrom0/
sudo ./VBoxLinuxAdditions-x86.run
It should run through the install and ask you to reboot when it's done.


If you get the warning message above ("...unknown version of ... X Windows...") you may encounter problems after rebooting. If so, please read this post for help.



2009/07/27

What I've been up to lately

So I moved into a house a few months ago, which gave us the room to set up an official "office" room. At this point I have my desktop in there and 1 server. My girlfriend has her desktop set up as well (though much more recently) as well as an extra monitor on her desk for her work laptop for when she works from home.

Her iMac G4 (if I'm remembering that correctly) is currently out of commission because her boyfriend flipped a wrong switch causing the outlet it was plugged into to switch off, killing the power supply in the process. Sorry. Who knew Mac power supplies were so fragile? Or maybe it was just on the brink already.

So, all my computers run linux of course. I have my desktop, my netbook and the server (and another desktop and laptop that are collecting dust right now). The server is actually her old laptop, but she lets me use it as our server, 'cause she's cool like that. We had been using it as a file server already, but we acquired a second-hand printer not long after moving in, so of course it quickly became the print server as well. I did some optimizations on it and added TorrentFlux (you know, for downloading linux distributions) and a CRM suite for when we do freelance work on the side. Not to mention some other minor things.

Well that was all working out just fine for a while, but we decided, being as smart as we are, that maybe putting all our eggs (data) in one basket (server) was a bad idea. I know, novel idea. So I set out restructuring our home network.

I figured, since my desktop is the most powerful computer in the house (world) and since hosting the majority of our data (porn) elsewhere left me with the better part of a terrabyte unused, I could give my desktop's life more meaning by having it be the file server instead and relieve the print server of its file hosting duties. This way, I can repurpose the print server as a backup server (of course it will still serve printers), and that's what I'm working on currently.

So, that's it in a nutshell. More to come, soon enough.



2009/07/23

A minor change

Originally, this blog was meant to host my developer journal, but I decided I wanted to also post about broader subjects, also. So, from here on out, in addition to my developer entries, expect to see more posts about computer geekage and the lot with potentially an occasional, completely off-topic post.

Oh and in case it's too cryptic, the new title is a mashup of me + *nix.

Updates about what I've been up to are on the way.