Build vbox kernel module failed wrong headers.

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
igadoter
Posts: 10
Joined: 8. Jan 2015, 23:42

Build vbox kernel module failed wrong headers.

Post by igadoter »

I posted the same on irc channel. I installed both kernel source and kernel headers. Yet vboxconfig fails to build kernel module.

Code: Select all

piotr[~]$ sudo vboxconfig
Hasło: 
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
 them. Please see your Linux system's documentation for more information.
Here are installed kernel version and kernel headers.

Code: Select all

piotr[~]$ ls /var/log/packages/kernel*
/var/log/packages/kernel-firmware-20160628git-noarch-1
/var/log/packages/kernel-headers-4.4.208_smp-x86-1
/var/log/packages/kernel-huge-4.4.29-i586-1_slack14.2
/var/log/packages/kernel-huge-smp-4.4.29_smp-i686-1_slack14.2
/var/log/packages/kernel-modules-4.4.29-i586-1_slack14.2
/var/log/packages/kernel-modules-smp-4.4.29_smp-i686-1_slack14.2
/var/log/packages/kernel-source-4.4.208_smp-noarch-1
piotr[~]$ 
I noticed the difference in version number: kernel version is 4.4.29 while version of source is 4.4.208. Can be this failure cause? But also in back of my head there is something about smp and non-smp kernel. As I remember there is something in smp non-smp diversity which may confuse applications which require to build kernel module.
DidierSpaier
Posts: 518
Joined: 20. Jun 2016, 20:15

Re: Build vbox kernel module failed wrong headers.

Post by DidierSpaier »

Indeed all kernel packages should be at the same version. You should have upgraded all of them.
igadoter
Posts: 10
Joined: 8. Jan 2015, 23:42

Re: Build vbox kernel module failed wrong headers.

Post by igadoter »

I am using salix repository mirror at http://ftp.nluug.nl/. Kernel and headers I installed with sudo slapt-get -t kernel-source, and slapt-get -i kernel-headers. I have no idea where version difference may come from. Can't recall hacking myself.
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Build vbox kernel module failed wrong headers.

Post by gapan »

You still have the default kernel packages that came with the installation iso, but the kernel-source package you installed from the repos is an updated one. You'll need to update all packages to the same version.

Run:

Code: Select all

ls /var/log/packages/kernel-*
and for each package you find, run:

Code: Select all

sudo slapt-get -i [package]
Don't forget to run lilo, or update the kernel in /boot/efi once you have updated, or you won't be able to boot.
Image
Image
igadoter
Posts: 10
Joined: 8. Jan 2015, 23:42

Re: Build vbox kernel module failed wrong headers.

Post by igadoter »

Thanks @gapan. I did as you posted. Problem solved. I tested VB on SalixLive. Works fine. Only issue is full screen mode which does not work as I expected.
Post Reply