Kernel Headers Affecting Guest Additons

Discussions about using Linux guests in VirtualBox.
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Kernel Headers Affecting Guest Additons

Post by AJavi »

i narrowed my problem down to guest additions not installing properly because of some dkms or missing kernel headers. the auto resize is grayed out so something is fishy. here is what it tells me after trying to install Guest Additons.

Removing existing VirtualBox DKMS kernel modules/etc/init.d/vboxadd: 526: cannot create /var/log/vboxadd-install.log: Permission denied
...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules/etc/init.d/vboxadd: 526: cannot create /var/log/vboxadd-install.log: Permission denied

The headers for the current running kernel were not found. If the following
module compilation fails then this could be the reason.
/etc/init.d/vboxadd: 526: cannot create /var/log/vboxadd-install.log: Permission denied
...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.

Doing non-kernel setup of the Guest Additions/etc/init.d/vboxadd: 526: cannot create /var/log/vboxadd-install.log: Permission denied
/etc/init.d/vboxadd: 526: cannot create /var/log/vboxadd-install.log: Permission denied
/etc/init.d/vboxadd: 526: cannot create /etc/udev/rules.d/60-vboxadd.rules: Permission denied
/etc/init.d/vboxadd: 526: cannot create /etc/udev/rules.d/60-vboxadd.rules: Permission denied
ln: cannot remove `/sbin/mount.vboxsf': Permission denied
...done.

WHAT DO I DO?!?
-Thanks
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: KERNEL HEADERS AFFECTING GUEST ADDIIONS!!

Post by Perryg »

Code: Select all

sudo apt-get install dkms build-essential 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: Kernel Headers Affecting Guest Additons

Post by Sasquatch »

Also, your installation is failing on it's own. Don't you see all those Permission Denied errors? They're everywhere!
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.
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Re: Kernel Headers Affecting Guest Additons

Post by AJavi »

Sasquatch wrote:Also, your installation is failing on it's own. Don't you see all those Permission Denied errors? They're everywhere!

Yes i see the permission denied. i run under "sudo" why would this be blocking me? also what should i do to fix this failed information? i am trying to install the Linux headers generic the other replier told me to. seems to be going through now but as a preemptive measure (cause obviously this isnt going to be enough to fix this with my luck) what else should i do to make guest additons install correctly. i think its 32 bit mint not 64 bit. i use auto run shell script anyway.
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: Kernel Headers Affecting Guest Additons

Post by Sasquatch »

Follow my guide for manual installation. It should be failproof.
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.
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Re: Kernel Headers Affecting Guest Additons

Post by AJavi »

Sasquatch wrote:Follow my guide for manual installation. It should be failproof.


where do i find this? also it didnt work to install these linux headers i got this error:
Uninstalling modules from DKMS
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxguest/4.0.4/source ->
/usr/src/vboxguest-4.0.4

DKMS: add Completed.

Error! Your kernel headers for kernel 2.6.39-020639rc5-generic cannot be found at
/lib/modules/2.6.39-020639rc5-generic/build or /lib/modules/2.6.39-020639rc5-generic/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
Failed to install using DKMS, attempting to install without
Makefile:23: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.. Stop.
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

So if you could tell me where this guide is i'd appreciate it. thanks.
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: Kernel Headers Affecting Guest Additons

Post by Sasquatch »

Use the stock kernel. 2.6.39 is NOT supported yet. And really, can't see someones signature or even browse the Tutorial Section at the top of the board?
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.
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Re: Kernel Headers Affecting Guest Additons

Post by AJavi »

Sasquatch wrote:Use the stock kernel. 2.6.39 is NOT supported yet. And really, can't see someones signature or even browse the Tutorial Section at the top of the board?

no i cannot. how do i install stock kernel? and still dont know where the guide is. ive been fooling around with this guest additions drama for 2 weeks now. i would like to end it today so i don't keep pesting everyone here.
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: Kernel Headers Affecting Guest Additons

Post by Sasquatch »

The link is in my signature for the GA guide. If you disabled the option to show users signatures, go to the forum index and check the top section.

To install the stock kernel, you just have to install the OS you want to use in VB. You already did that, and later added a new kernel manually. So either remove the kernel you installed last (2.6.39rc5), or select the other kernel in Grub. You might have to hold the left shift as the VM boots to show the grub menu.
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.
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Re: Kernel Headers Affecting Guest Additons

Post by AJavi »

Sasquatch wrote:The link is in my signature for the GA guide. If you disabled the option to show users signatures, go to the forum index and check the top section.

To install the stock kernel, you just have to install the OS you want to use in VB. You already did that, and later added a new kernel manually. So either remove the kernel you installed last (2.6.39rc5), or select the other kernel in Grub. You might have to hold the left shift as the VM boots to show the grub menu.
i found the install with xorg+config article. i guess i will try to install this way. when i booted pressing the shift key i found 4 or 5 different options. 2 were recovery and the other some different form of Linux Mint. one looked like it had those generic kernels. im still not sure what to do with these stock kernels. should i just follow this guide: http://forums.virtualbox.org/viewtopic.php?t=15679?
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Re: Kernel Headers Affecting Guest Additons

Post by AJavi »

AJavi wrote:
Sasquatch wrote:The link is in my signature for the GA guide. If you disabled the option to show users signatures, go to the forum index and check the top section.

To install the stock kernel, you just have to install the OS you want to use in VB. You already did that, and later added a new kernel manually. So either remove the kernel you installed last (2.6.39rc5), or select the other kernel in Grub. You might have to hold the left shift as the VM boots to show the grub menu.
i found the install with xorg+config article. i guess i will try to install this way. when i booted pressing the shift key i found 4 or 5 different options. 2 were recovery and the other some different form of Linux Mint. one looked like it had those generic kernels. im still not sure what to do with these stock kernels. should i just follow this guide: http://forums.virtualbox.org/viewtopic.php?t=15679?
$ sudo apt-get install dkms build-essential linux-headers-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
dkms is already the newest version.
build-essential is already the newest version.
linux-headers-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

i went through your guide and everything after the installation of dkms and kernel headers. apparently it is up to date. so i tried to install (with auto run) and it has the same error message of cant build kernel modules and headers for current version weren't found. should i get the server kernel headers? i dont know...
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Kernel Headers Affecting Guest Additons

Post by Perryg »

The reason you are seeing this is due to a mismatch of the kernel being used and the headers.
You can try to install the right headers but they may not be available yet because the kernel you are using is not stock.
Try sudo apt-get install linux-headers-$(uname -r)
If the OS states that they do not exist you will need to pick the one (at boot) that has the proper headers that are available and installed.
There is no way around this no matter what you want. You need the kernel, and the headers to match.
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Re: Kernel Headers Affecting Guest Additons

Post by AJavi »

Perryg wrote:The reason you are seeing this is due to a mismatch of the kernel being used and the headers.
You can try to install the right headers but they may not be available yet because the kernel you are using is not stock.
Try sudo apt-get install linux-headers-$(uname -r)
If the OS states that they do not exist you will need to pick the one (at boot) that has the proper headers that are available and installed.
There is no way around this no matter what you want. You need the kernel, and the headers to match.

Thank you that makes more sense. here is what happened after i ran the command you told me to.

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package linux-headers-2.6.39-020639rc5-generic

what step should i take now? not sure about the stock kernel. when i booted in the grub menu i saw a bunch of things (some recovery and another that had the OS with the generic headers and another that, i think, did not.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Kernel Headers Affecting Guest Additons

Post by Perryg »

Well Boot using the shift key and select the next kernel down in the list. (not the recovery one).
Once booted (IMHO) I would use the package manager and remove the 2.6.39-020639rc5-generic kernel.
Then run.

Code: Select all

sudo apt-get install dkms build-essential linux-headers-generic
The see if you can install the guest additions.
AJavi
Posts: 20
Joined: 3. May 2011, 03:39
Primary OS: MS Windows 7
VBox Version: OSE Debian
Guest OSses: Linux Mint and Linux Ubuntu

Re: Kernel Headers Affecting Guest Additons

Post by AJavi »

Perryg wrote:Well Boot using the shift key and select the next kernel down in the list. (not the recovery one).
Once booted (IMHO) I would use the package manager and remove the 2.6.39-020639rc5-generic kernel.
Then run.

Code: Select all

sudo apt-get install dkms build-essential linux-headers-generic
The see if you can install the guest additions.
i tried to reboot and pressed the left shift key. now i dont get the grub menu. anyway i booted normally i guess. to make sure is this what i should remove??

Linux kernel image for version 2.6.39 on x86/x86_64

This package contains the Linux kernel image for version 2.6.39 on
x86/x86_64.

Also includes the corresponding System.map file, the modules built by the
packager, and scripts that try to ensure that the system is not left in an
unbootable state after an update.

Supports Generic processors.

Geared toward desktop systems.

You likely do not want to install this package directly. Instead, install
the linux-generic meta-package, which will ensure that upgrades work
correctly, and that supporting packages are also installed.
Post Reply