LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem with VirtualBox after upgrading kernel to 4.5.2 (https://www.linuxquestions.org/questions/linux-software-2/problem-with-virtualbox-after-upgrading-kernel-to-4-5-2-a-4175578636/)

hydrurga 04-29-2016 12:01 PM

Problem with VirtualBox after upgrading kernel to 4.5.2
 
Hi there,

I've been running VirtualBox 5.0 (now 5.0.20) from the Oracle repository for several months with no problems on my Linux Mint 17.3 box.

I have just upgraded the Linux kernel to 4.5.2 through the instructions on this site: https://mintguide.org/system/602-ins...inux-mint.html . It went well, apart from the following error produced a couple of times when installing the relevant debs:

Code:

Error! Could not locate dkms.conf file.
File:  does not exist.
Error! Bad return status for module build on kernel: 4.5.2-040502-generic (x86_64)

Testing my system under the new kernel has gone well so far but VirtualBox refuses to launch clients with the following error:

Code:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing

'/sbin/rcvboxdrv setup'

as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

I have dkms version 2.2.0.3 installed on my system, but when I look to install virtualbox-dkms, it selects the Ubuntu repo version and thus requests to uninstall my later Oracle version of VirtualBox.

Does anyone know what my next step should be?

hydrurga 04-29-2016 12:15 PM

(more info)

On running dpkg-reconfigure virtualbox-5.0, the result is:

Code:

addgroup: The group `vboxusers' already exists as a system group. Exiting.
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modulesError! Could not locate dkms.conf file.
File:  does not exist.
 ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Bad return status for module build on kernel: 4.5.2-040502-generic (x86_64)
Consult /var/lib/dkms/vboxhost/5.0.20/build/make.log for more information.
 ...failed!
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)

/var/log/vbox-install.log is quite complex but the main error seems to be that -fstack-protector-strong is not recognised as a command line option by gcc.

donald3.heckel 04-29-2016 12:53 PM

Hello Hydrurga,

I have had a similar issue with Virtualbox before.

Since you upgraded your kernel, it could be a module issue.

run /etc/init.d/vboxdrv setup and let me know the output,

then try the following:

Code:

# modprobe vboxdrv
# modprobe vboxpci
# modprobe vbox-host-dkms
# modprobe vboxnetadp
# modprobe vboxnetflt

and let me know what happens.

Sincerely,

donald3.heckel

hydrurga 04-29-2016 12:57 PM

Hi Donald.

Output of /etc/init.d/vboxdrv setup:

Code:

Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Bad return status for module build on kernel: 4.5.2-040502-generic (x86_64)
Consult /var/lib/dkms/vboxhost/5.0.20/build/make.log for more information.
 ...failed!
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)

Entire /var/log/vbox-install.log:

Code:

Uninstalling modules from DKMS
  removing old DKMS module vboxhost version  5.0.20

------------------------------
Deleting module version: 5.0.20
completely from the DKMS tree.
------------------------------
Done.
Attempting to install using DKMS

Creating symlink /var/lib/dkms/vboxhost/5.0.20/source ->
                /usr/src/vboxhost-5.0.20

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.5.2-040502-generic -C /lib/modules/4.5.2-040502-generic/build M=/var/lib/dkms/vboxhost/5.0.20/build....(bad exit status: 2)
Failed to install using DKMS, attempting to install without
make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/4.5.2-040502-generic/build modules
Makefile:666: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (                \
        echo >&2;                                                        \
        echo >&2 "  ERROR: Kernel configuration is invalid.";                \
        echo >&2 "        include/generated/autoconf.h or include/config/auto.conf are missing.";\
        echo >&2 "        Run 'make oldconfig && make prepare' on kernel src to fix it.";        \
        echo >&2 ;                                                        \
        /bin/false)
mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*
make -f ./scripts/Makefile.build obj=/tmp/vbox.0
  gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d  -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -fno-omit-frame-pointer -fno-optimize-sibling-calls -pg -DCC_HAVE_ASM_GOTO -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/lib/modules/4.5.2-040502-generic/build/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ -I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DSUPDRV_WITH_RELEASE_LOGGER -Wno-declaration-after-statement -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS  -DMODULE  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)"  -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -c -o /tmp/vbox.0/linux/.tmp_SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
gcc: error: unrecognized command line option ‘-fstack-protector-strong’
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2


hydrurga 04-29-2016 12:59 PM

Results of modprobes:

modprobe: FATAL: Module vboxdrv not found.

and same for others.

273 04-29-2016 01:05 PM

I take it you installed the kernel-headers for the new kernel and, possibly, the whole source also?

hydrurga 04-29-2016 01:13 PM

Quote:

Originally Posted by 273 (Post 5538382)
I take it you installed the kernel-headers for the new kernel and, possibly, the whole source also?

I installed:

linux-headers-4.5.2-040502-generic_4.5.2-040502.201604200335_amd64.deb
linux-headers-4.5.2-040502_4.5.2-040502.201604200335_all.deb
linux-image-4.5.2-040502-generic_4.5.2-040502.201604200335_amd64.deb

Running dkms autoinstall also fails to upgrade the other package in dkms, ndiswrapper, with the same error about a missing gcc command line option -fstack-protector-strong in its error log. It's looking likely that I need to upgrade gcc, but I'm not yet sure about how I go about this.

donald3.heckel 04-29-2016 01:13 PM

Hello hydraruga,

This is a common issue amongst kernel upgrades and virtualbox. Hang in there.

There we go ;)

Your Virtualbox application still thinks you're running your old kernel. Now we are making progress.

Try adding the following modules to your /etc/modules:

Code:

vboxdrv vboxpci vbox-host-dkms vboxnetadp vboxnetflt
Update: make sure vboxdrv is installed.

And then reboot and run /etc/init.d/vboxdrv restart again.

Let me know how it goes and paste your output again if something goes wrong.

Sincerely,

donald3.heckel

hydrurga 04-29-2016 01:20 PM

Quote:

Originally Posted by donald3.heckel (Post 5538387)
Hello hydraruga,

This is a common issue amongst kernel upgrades and virtualbox. Hang in there.

There we go ;)

Your Virtualbox application still thinks you're running your old kernel. Now we are making progress.

Try adding the following modules to your /etc/modules:

Code:

vboxdrv vboxpci vbox-host-dkms vboxnetadp vboxnetflt
Update: make sure vboxdrv is installed.

And then reboot and run /etc/init.d/vboxdrv restart again.

Let me know how it goes and paste your output again if something goes wrong.

Sincerely,

donald3.heckel

Sorry for the naïve question, Donald, but how do I add those modules to /etc/modules?

Also, just in case it's important, my system doesn't have a directory /etc/modules.

donald3.heckel 04-29-2016 01:24 PM

Update:

It's showing this for the other modules too? :(

If all else fails, you could try a Virtualbox reinstall.

Code:

sudo apt-get autoremove virtualbox
sudo apt-get purge virtualbox

And instead of using apt-get,

Download:

http://download.virtualbox.org/virtu...inux_amd64.run

And then run:

Code:

chmod +x VirtualBox-5.0.20-106931-Linux_amd64.run
sudo ./VirtualBox-5.0.20-106931-Linux_amd64.run

That should rebuild the kernel modules. Be sure to keep the aforementioned modules in your /etc/modules.

Sincerely,

donald3.heckel

donald3.heckel 04-29-2016 01:27 PM

Update:

No problem hydra.

Code:

sudo nano /etc/modules
Append the modules, and then control X to save and exit.

Update:

You could just run the following:

Code:

sudo echo "vboxdrv vboxpci vbox-host-dkms vboxnetadp vboxnetflt" >> /etc/modules
Sincerely,

donald3.heckel

hydrurga 04-29-2016 01:30 PM

Thanks Donald, but I suspect that the compiles will fail unless I can update gcc to 4.9 in order to support the -fstack-protector-strong command line option.

The questions arise then: (i) how would I do this? (ii) what are the risks involved in upgrading gcc on an otherwise stable system (if 4.9 becomes my default compiler then I'd better be pretty sure that any future programs to be installed which expect the 4.8 compiler are not going to fall over i.e. that there is perfect backwards-compatibility)?

hydrurga 04-29-2016 01:32 PM

Quote:

Originally Posted by donald3.heckel (Post 5538394)
Update:

No problem hydra.

Code:

sudo nano /etc/modules
Append the modules, and then control X to save and exit.

Sincerely,

donald3.heckel

:) Thanks. I stupidly assumed that /etc/modules was a directory.

donald3.heckel 04-29-2016 01:42 PM

I suggest you run the .run file instead of compiling it from source. It should build everything for you.

You're doing good.

Sincerely,

donald3.heckel

hydrurga 04-29-2016 01:51 PM

Quote:

Originally Posted by donald3.heckel (Post 5538402)
I suggest you run the .run file instead of compiling it from source. It should do everything for you.

You're doing good.

Sincerely,

donald3.heckel

:) I'll get there. I'll try the module method you mentioned before the fallback reinstall one. However, vboxdrv isn't installed despite dpkg-l showing that virtualbox-5.0 is installed.


All times are GMT -5. The time now is 12:55 AM.