[Solved] Virtualbox Stopped working after ubuntu upgrade

If you don’t know what Virtualbox is you can read about it here. If you are familiar with VMWare (Virtualization Software). Its kind of similar to that for Linux. It is also available for windows as well.

Now, back to the main problem. Recently I made upgrade from Lucid to Oneiric. This upgrade broke many of my softwares installed previously. One of the victim is Virtual box. Main UI for the Virtual box ran fine but when I created virtual harddisk and tried to start it. This is where the problem occured. I always got the following error :

Kernel driver not installed (rc=-1908)
Please install the virtualbox-ose-dkms package and execute ‘modprobe vboxdrv’ as root.

Then what I did is first removed the dkms package for virtualbox
[sourcecode language=’bash’]samundra@mystic-angel:~$ sudo aptitude remove virtualbox-ose-dkms[/sourcecode]

Then I uninstalled the virtual box currently installed. It won’t uninstall the virtual harddisk created with it just some configuration files and user profiles for virtualbox. Nothing serious here.
[sourcecode language=’bash’]samundra@mystic-angel:~$ sudo aptitude remove virtualbox-ose[/sourcecode]
Then I got the latest virtualbox for oneiric as .deb package. I download it from https://www.virtualbox.org/wiki/Linux_Downloads

For Oneiric, I downloaded http://download.virtualbox.org/virtualbox/4.1.18/virtualbox-4.1_4.1.18-78361~Ubuntu~oneiric_i386.deb

When download was complete. I used ubuntu software center to install the software. It got installed without any error.

Then the final part is to load the virtual box driver. I did that using the following command.
[sourcecode language=’bash’]samundra@mystic-angel:~$ cd /etc/init.d/
samundra@mystic-angel:/etc/init.d$ ls | grep vbox
vboxballoonctrl-service
vboxdrv
vboxweb-service[/sourcecode]
The above output clearly shows that I had startup scripts for virtualbox. Now to upgrade the previous virtualbox driver and update it with new one. I ran the following command. This command is only listed in the official documentation for the virtualbox, If you have time then you should always read the official documentation first. Which we 80% skip for the first time. 🙂 The command I used is :

Virtualbox Upgrade

[sourcecode language=’bash’]samundra@mystic-angel:/etc/init.d$ sudo /etc/init.d/vboxdrv setup
[sudo] password for samundra:
* Stopping VirtualBox kernel modules [ OK ]
* Uninstalling old VirtualBox DKMS kernel modules [ OK ]
* Trying to register the VirtualBox kernel modules using DKMS [ OK ]
* Starting VirtualBox kernel modules [ OK ]
samundra@mystic-angel:/etc/init.d$[/sourcecode]

Everything went fine. Now, the final part was to run the virtual box and see if everything is fine. I ran the virtualbox. And started a virtual harddisk, which ran fine with no errors. So, I got my virtualbox up and running within 10 minutes. Most of my time is killed due to downloads, which I kill by watching movies. Slow internet connection Poor me 🙂 Hope you have enjoyed reading my blog. If you have any questions or queries please drop them in comments.