Problems building kernel modules on Fedora 26

Discussions related to using VirtualBox on Linux hosts.
Post Reply
deviouswalsh
Posts: 4
Joined: 8. Nov 2017, 19:45

Problems building kernel modules on Fedora 26

Post by deviouswalsh »

Hello,

I've taken a Windows 10 machine and made it into a Linux box running Fedora 26. Now I'm trying to install VirtualBox 5.2, but I'm having problems building the kernel modules. The vbox-install.log file is showing this error:

Code: Select all

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 ;             
But when I go to the kernel directory on my machine: /usr/src/kernels/4.13.11-200.fc26.x86_64 and run the commands specified, I get this error:

Code: Select all

  make oldconfig && make prepare 
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/basic/bin2c
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      arch/x86/purgatory/purgatory.o
  AS      arch/x86/purgatory/stack.o
  AS      arch/x86/purgatory/setup-x86_64.o
  CC      arch/x86/purgatory/sha256.o
  AS      arch/x86/purgatory/entry64.o
  CC      arch/x86/purgatory/string.o
  LD      arch/x86/purgatory/purgatory.ro
  BIN2C   arch/x86/purgatory/kexec-purgatory.c
  DESCEND  objtool
usr/src/kernels/4.13.11-200.fc26.x86_64/tools/build/Makefile.build:36: /usr/src/kernels/4.13.11-200.fc26.x86_64/tools/build/Build.include: No such file or directory
make[4]: *** No rule to make target '/usr/src/kernels/4.13.11-200.fc26.x86_64/tools/build/Build.include'.  Stop.
make[3]: *** [Makefile:42: /usr/src/kernels/4.13.11-200.fc26.x86_64/tools/objtool/fixdep-in.o] Error 2
make[2]: *** [/usr/src/kernels/4.13.11-200.fc26.x86_64/tools/build/Makefile.include:4: fixdep] Error 2
make[1]: *** [Makefile:62: objtool] Error 2
make: *** [Makefile:1641: tools/objtool] Error 2
Any help is appreciated!
deviouswalsh
Posts: 4
Joined: 8. Nov 2017, 19:45

Re: Problems building kernel modules on Fedora 26

Post by deviouswalsh »

Well, I got the /usr/lib/virtualbox/vboxdrv.sh setup to work by taking my machine out of secure boot mode. I had read that was a solution for some people, and it worked for me.
user9001
Posts: 9
Joined: 24. Nov 2016, 15:16

Re: Problems building kernel modules on Fedora 26

Post by user9001 »

I've got this same problem on my Fedora 26. But I don't have secure boot, so I can't disable it.

Any other advice what to do about it?
Post Reply