Page 1 of 1

Guest additions installation fails Ubuntu 12.04

Posted: 13. Mar 2013, 00:13
by adb
Host in Win7x64
VBOX version is 4.1.18 r78631
I have a fresh Ubuntu install from the ubuntu-12.04.2-alternate-amd64.iso image

I think I have followed instructions from Sasquatch's page @ viewtopic.php?f=3&t=15679

The linux-headers-3.5.0-23-generic were already installed and I assume the reference to uname -r meant that these headers rather than the "linux-headers" on it's own should be installed.

Install does

Code: Select all

Verifying archive integrity... All good.
Uncompressing VirtualBox 4.1.18 Guest Additions for Linux.........
VirtualBox Guest Additions installer
Removing installed version 4.1.18 of VirtualBox Guest Additions...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules
The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.

Building the main Guest Additions module ...fail!
(Look at /var/log/vboxadd-install.log to find out what went wrong)
Doing non-kernel setup of the Guest Additions ...done.
Installing the Window System drivers
Warning: unknown version of the X Window System installed.  Not installing
X Window System drivers.
Installing modules ...done.
Installing graphics libraries and desktop services components ...done.
Press Return to close this window...
The vboxadd-install.log referes to the dkms make.log, also attached

I also tried to install just linux-headers on its own and it tried to install 3.2.0-38-generic and it gave me

Code: Select all

Unpacking linux-headers-generic (from .../linux-headers-generic_3.2.0.38.46_amd64.deb) ...
Setting up linux-headers-3.2.0-38 (3.2.0-38.61) ...
Setting up linux-headers-3.2.0-38-generic (3.2.0-38.61) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-38-generic /boot/vmlinuz-3.2.0-38-generic
Error! Module version 4.1.12_Ubuntu for vboxguest.ko
is not newer than what is already found in kernel 3.2.0-38-generic (4.1.18).
You may override by specifying --force.
Error! Module version 4.1.12_Ubuntu for vboxsf.ko
is not newer than what is already found in kernel 3.2.0-38-generic (4.1.18).
You may override by specifying --force.
Error! Module version 4.1.12_Ubuntu for vboxvideo.ko
is not newer than what is already found in kernel 3.2.0-38-generic (4.1.18).
You may override by specifying --force.
Setting up linux-headers-generic (3.2.0.38.46) ...
I am not sure where to go now...

Re: Guest additions installation fails Ubuntu 12.04

Posted: 13. Mar 2013, 01:19
by Perryg
Alternate installs are a little more tricky. They usually don't use the generic headers.
try the following command and watch for errors.

Code: Select all

sudo apt-get install linux-headers-$(uname -r)
You can also run uname -r in a terminal and see the running kernel

Re: Guest additions installation fails Ubuntu 12.04

Posted: 13. Mar 2013, 03:37
by adb
Perryg wrote:Alternate installs are a little more tricky. They usually don't use the generic headers.
try the following command and watch for errors.

Code: Select all

sudo apt-get install linux-headers-$(uname -r)
You can also run uname -r in a terminal and see the running kernel
That was the command I ran originally to get the headers to install and it evaluated to linux-headers-3.5.0-23-generic

Re: Guest additions installation fails Ubuntu 12.04

Posted: 13. Mar 2013, 15:01
by Perryg
I would purge virtualbox from the guest and reboot to make sure that the kernel does not have it in memory and then install the GAs version that matches the install.

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 00:09
by adb
Perryg wrote:I would purge virtualbox from the guest and reboot to make sure that the kernel does not have it in memory and then install the GAs version that matches the install.
Do you mean install 4.1.12 GA as that is the version that Ubuntu seems to come with?

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 00:15
by Perryg
Yes.
The repo versions are not the same as the original and cause issues.

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 01:52
by adb
Perryg wrote:Yes.
The repo versions are not the same as the original and cause issues.
As it's so easy to install a VM, I created a new fresh install from the standard desktop build

ubuntu-12.04.2-desktop-amd64.iso

I then did

1. downloaded GA 4.1.12 ISO
2. Installed the additional bits according to instructions, i.e.

Code: Select all

apt-get install dkms build-essential linux-headers-$(uname -r)
and got exactly the same problem. The vboxadd-install.log says that the dkms build failed and make.log shows the same error as before, i.e.

/var/lib/dkms/vboxguest/4.1.12/build/vboxguest/r0drv/linux/memobj-r0drv-linux.c:1150:9: error: implicit declaration of function 'do_mmap' [-Werror=implicit-function-declaration]

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 02:01
by Perryg
Post the guests log file (as an attachment)
See Online Users Manual for the location of the file.

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 02:44
by adb
Perryg wrote:Post the guests log file (as an attachment)
Log attached.

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 03:05
by Perryg
/var/lib/dkms/vboxguest/4.1.12/build/vboxguest/r0drv/linux/memobj-r0drv-linux.c:1150:9: error: implicit declaration of function 'do_mmap' [-Werror=implicit-function-declaration]
VirtualBox 4.1.18 r78361 win.amd64 (Jun 5 2012 15:58:23) release log

See the difference of versions? How are you trying to install the guest additions?
Did you click the devices tab and then click install guest additions or are you trying to install the GAs from the repo?

If neither than the guest already has the wrong GAs and you need to purge them.

You can do this from a terminal with the following

sudo apt-get purge virtualbox*
or
sudo apt-get purge VirtualBox*

Then try to install them by clicking on the device tab and install. This mounts the iso and if it is already mounted you need to start the install manually or click devices and remove from cd and then devices and install.

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 05:19
by adb
Perryg wrote:
/var/lib/dkms/vboxguest/4.1.12/build/vboxguest/r0drv/linux/memobj-r0drv-linux.c:1150:9: error: implicit declaration of function 'do_mmap' [-Werror=implicit-function-declaration]
VirtualBox 4.1.18 r78361 win.amd64 (Jun 5 2012 15:58:23) release log

See the difference of versions? How are you trying to install the guest additions?
Yes indeed, I understood that is what you were suggesting I do. In my original post I said I am using 4.1.18 and that was not working. The reason for using 4.1.12 is that when I tried installing the basic "linux-headers" it mentioned Virtualbox 4.1.12, which I am not using and you said I should install the GA that matches the install.
Perryg wrote:Did you click the devices tab and then click install guest additions or are you trying to install the GAs from the repo?
I originally clicked the devices tab to install the GA. They are 4.1.18 as mentioned. I downloaded the 4.1.12 GA ISO from http://download.virtualbox.org/virtualbox/4.1.12/ and installed that by Devices->Choose DVD...
Perryg wrote:If neither than the guest already has the wrong GAs and you need to purge them.

You can do this from a terminal with the following

sudo apt-get purge virtualbox*
or
sudo apt-get purge VirtualBox*

Then try to install them by clicking on the device tab and install. This mounts the iso and if it is already mounted you need to start the install manually or click devices and remove from cd and then devices and install.
So, on a fresh Ubuntu install with nothing done apart from the basic OS install, how can I tell if the guest has any GA? VBox says is does not have any when I try to select Shared folders and installing the GA from the host fails as reported in my first post.

Thanks for your time and help, don't give up just yet :)

Re: Guest additions installation fails Ubuntu 12.04

Posted: 14. Mar 2013, 14:56
by Perryg
Some OSes come with a form of GAs already installed. Ubuntu is one.
Run the commands and see if it removes anything.
You are going to need to get these to 4.1.18 as I am not sure the newer kernel will compile the external modules properly in an older version.