VirtualBox 3.2.6 Guest Additions for Linux problem

This is for discussing general topics about how to use VirtualBox.
Post Reply
sim085
Posts: 26
Joined: 6. Jul 2007, 13:46

VirtualBox 3.2.6 Guest Additions for Linux problem

Post by sim085 »

Hello,

I am (again) having problems installing VirtualBox 3.2.6 Guest Additions for Linux. What I did is the following. Installed ubuntu-10.04-server-i386, and on top of this I installed xubuntu-desktop. Then I ran the following command as stated here; http://forums.virtualbox.org/viewtopic.php?f=29&t=15679

Code: Select all

apt-get install build-essential linux-headers-generic
After this I installed the VirtualBox 3.2.6 Guest Additions for Linux using the following command;

Code: Select all

sudo sh /media/VBOXADDITIONS_3.2.6_63112/VBoxLinuxAdditions-x86.run
However here I am given the following message; Your system does not seem to be set up to build kernel modules. Therefore run the following command;

Code: Select all

sudo /etc/init.d/vboxadd setup
I get no errors after this and therefore go and restart the system. However I still do not seem to have VirtualBox Guest Additions properly installed since the options Enter Seemless Host and Enable Guest Display Auto-Size are still disabled.

Does anyone know what I might be doing wrong?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: VirtualBox 3.2.6 Guest Additions for Linux problem

Post by Sasquatch »

The problem is that you do not have the kernel-headers package installed for your kernel. Check that with uname -r. That will probably NOT show 2.6.32-xxx-generic. So just having build-essential and dkms installed should have been enough. Really, don't forget DKMS, it will give you smooth kernel upgrades, so you don't have to install the GA again and again when the kernel gets an update.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
sim085
Posts: 26
Joined: 6. Jul 2007, 13:46

Re: VirtualBox 3.2.6 Guest Additions for Linux problem

Post by sim085 »

I did install dkms, and infact I always get the message that "dkms is alreadt the latest version". I forgot to mention that in my first post. When I use the command uname -r I get the result 2.6.32-24-generic. I really do not know what I have wrong. The last I did these steps everything worked fine. Shouldn't kernel headers be installed with the command apt-get install linux-headers-generic?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: VirtualBox 3.2.6 Guest Additions for Linux problem

Post by Sasquatch »

It should. This is odd. Following my howto should not give problems like this. Can you move the mouse freely from the Host to the VM and vice versa without the need to capture it manually by clicking inside the VM?
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
sim085
Posts: 26
Joined: 6. Jul 2007, 13:46

Re: VirtualBox 3.2.6 Guest Additions for Linux problem

Post by sim085 »

No. If you want I can try this again. I will install ubuntu-10.05-server-i386 and then continue with the following commands

Code: Select all

sudo su
apt-get update
apt-get install dkms build-essential linux-headers-generic
apt-get install xubuntu-desktop
After, once all installations are ready, I will install VirtualBox 3.2.6 Guest Additions for Linux. I guess in that order everything should work right, or?
sim085
Posts: 26
Joined: 6. Jul 2007, 13:46

Re: VirtualBox 3.2.6 Guest Additions for Linux problem

Post by sim085 »

Just to confirm that with the above steps I still got the same error when installing VirtualBox 3.2.6 Guest Additions for Linux. The error is as follows;

----- START -----
Building the VirtualBox Guest Additions kernel modules ...fail!
Your system does not seem to be set up to build kernel modules.
Look at /var/log/vboxadd-install.log to find out what went wrong. Once you have corrected it, you can run

/etc/init.d/vboxadd setup

to build them.

----- END -----

In the file /var/log/vboxadd-install.log I have the following;

----- START -----
Makefile:23: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again... Stop.
----- END -----

I will google on this error to see if I can find something. However I thought of posting it here just in case.
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: VirtualBox 3.2.6 Guest Additions for Linux problem

Post by Sasquatch »

If you installed Ubuntu server first, and then grabbed Xubuntu-desktop, why not get Xubuntu in the first place? And the Server flavour uses a different kernel by default than -generic. You really have to check if the headers installed are the same as the kernel you're running. Easy fix for the headers problem:

Code: Select all

sudo apt-get install linux-headers-`uname -r`
Then run the GA installer. No need for a reboot before you get to installing the GA.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
sim085
Posts: 26
Joined: 6. Jul 2007, 13:46

Re: VirtualBox 3.2.6 Guest Additions for Linux problem

Post by sim085 »

Sasquatch wrote:Easy fix for the headers problem:
First of all thank you very much. That worked fine :)
Sasquatch wrote:If you installed Ubuntu server first, and then grabbed Xubuntu-desktop, why not get Xubuntu in the first place?
I did not do that because I wanted to have a server installation. Xubuntu distro only comes as the desktop edition as much as I know. I did not know (before now) that the desktop edition used a different kernel version then the sever edition. I think considering this I may go for ubuntu-desktop and forget all about this setup.

Thanks again very much for all your help.
Post Reply