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.



2008/10/04

egg-fu Gets Listed on Softpedia.com

Today I received an email from Softpedia.com notifying me that they have listed my egg-fu project on their site. They categorized it under "Mac OS" for some reason, and had the description slightly messed up, but I was glad to hear about it. I immediately emailed them back thanking them and asked them to categorize it appropriately under "Linux" instead and also asked them to fix the description.

You can see the listing here: http://linux.softpedia.com/get/Communications/Chat/egg-fu-41815.shtml



2008/09/27

Ruby

I've been interested in learning to program Ruby for quite some time now, but my life has been too hectic to find the time. Now that my life is starting to calm down more I will have the free time to start programming again and learn Ruby. Since I have a great deal of experience programming in general, it should be rather painless and quick to learn Ruby. I naturally learn pretty quickly anyway, so it should work out pretty well.

The way I learn is by doing, so I need a project to work on as I learn. I couldn't really think of anything to do while I learn Ruby. That is, until recently as I was going through a list of Nintendo DS games. The way the scene names or labels each released game makes it nearly impossible to find the game you want without just going through the entire list, because they are named first by the release number and then the game's name. So the files are sorted alphanumerically and the first four characters are the number of the release which makes alphabetical sorting useless. So my thought then was to create a simple program that will extract certain parameters from the filenames such as the actual name of the game and release number, etc. and create and maintain a searchable database of all this information and even update the database as new games are released. It could even be coded to work the other way as well (once the database is at least mostly complete), where a misnamed file can be renamed appropriately and so on. Anyway, I plan on working on something like this as I teach myself Ruby. The program would start out simplistic at first and progressively become more useful as I go.

So there will be some posts upcoming soon with more detail on what I have planned for that project.



2008/09/24

About egg-fu

egg-fu is a script for eggdrop IRC bots. In short it learns from what people in your channel talk about and progressively becomes more conversational. It started out pretty simple but as more ideas came to me it quickly became more complex. Because I was releasing it as a free, open source project I also made it completely configurable; every aspect can be configured, from the styles of responses to the native language.

It's a fairly successful project considering how niche it is and it's been going strong (as far as the number of downloads logged daily) even today, in spite of the fact that it has not been updated since 2003.

But I do plan on putting more work into egg-fu. A friend of mine has been wanting to get involved in the project and he has some great ideas for egg-fu. Of course, I also plan to update the code quote a bit as well; there are a lot of things I'd like to improve upon.

So stay tuned for more news on this project.


For a more detailed description, below is text quoted straight from the documentation included with each release:

First of all, what IS egg-fu? egg-fu is an eggdrop script coded in Tcl designed to simulate artificial intelligence, and engage an IRC user in conversation. The program is not actually artificially intelligent, as it doesn't make it's own decisions or form it's own opinions, it simply imitates such behavior by listening to what people say in a channel and remembering key points and 'learning' new things to say in this manner. When a topic that egg-fu recognizes is brought up or a keyword is said, egg-fu will randomly pick a tid-bit of information it has learned about it and respond appropriately, according to your own configurations.

This is the main function of egg-fu. To learn and respond. However, egg-fu can be configured as a medium for storing and retrieving information only when prompted.

egg-fu was based on the infoegg bot (which is based on infobot). Info egg was designed such that it would learn by listening and only respond to questions. It's learning matrices were very simple. It was these, that egg-fu was modeled after, and greatly improved upon. egg-fu talks and reacts much more fluidly and intuitively than info egg and requires no prompting to respond, unless configured that way. Being able to respond to any line of text sent to a channel (provided it's a topic that egg-fu knows) makes it's speech appear more life-like. In addition to its own learning capacity, all the teaching methods (features) coded in allow you to tweak egg-fu's responses to give it an even more realistic personality.

What prompted me to create egg-fu was when I was idly tweaking the code in infoegg and fixing bugs. When I realized how much work I was putting into it, I decided to make my own. The code was at first loosely based on infoegg's code, but has since been coded out. However I still credit infoegg's author to the birth of egg-fu.