0

This is how far I've gotten:

echo "deb http://download.virtualbox.org/virtualbox/debian jessie contrib" | tee -a /etc/apt/sources.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | apt-key add -
apt-get update
apt-get install -y linux-headers-amd64 virtualbox-5.1
dpkg-reconfigure virtualbox-5.1

But I receive an error message

dpkg-query: no path found matching pattern /lib/modules/4.7.3-coreos-r2/kernel
vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
dpkg-query: no path found matching pattern /lib/modules/4.7.3-coreos-r2/kernel
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:

  apt-get install -headers-4.7.3-coreos-r2
(The last command may fail if your system is not fully updated.)
  apt-get install -headers-r2

The onscreen instructions are not correct since -headers-4.7.3-coreos-r2 doesn't exist. Neither does linux-headers-4.7.3-coreos-r2. I also tried linux-headers-$(uname-r) which indeed expands to linux-headers-4.7.3-coreos-r2 and linux-headers-generic which says it has no installation candidate.

  • What is host and what is guest? – user192526 Dec 9 '16 at 13:14
  • @Kit : It might sound silly idea, but on the other hand it could worth to try. Your kernel provider should have provide also a valid header file, even if the header file is generic. So.. could a copy of this generic header file with the name that virtualbox scripts expects to find the header file could do the trick and unblock the vobx installer? – George Vasiliou Dec 10 '16 at 23:57
  • @GeorgeVasiliou That's basically the issue yeah. My hosting provider had a custom kernel, I needed prepare a kernel myself instead of relying on the apt generic one. – Kit Sunde Dec 12 '16 at 4:06
  • @KitSunde: Even with a custom kernel your provider should use/provide a header file (even if it is generic). My idea is to rename this generic header file in a name that VBox could recognize and pass the test. – George Vasiliou Dec 12 '16 at 11:50
  • Maybe this page was not around when this question was posted. Posting this for future CoreOS hackers. coreos.com/os/docs/latest/kernel-modules.html – viking Oct 30 '17 at 21:31
0

I think the requirement is not for kernel-headers but for kernel-devel package. kernel-devel package will provide you with .ko modules. See if doing apt-get install for kernel devel package helps you?

  • There's no kernel-devel package in debian, that's a RHEL thing. From all the research I've done it seems like the basic issue is that I have a custom kernel and the header package available through apt is for a generic one. – Kit Sunde Dec 8 '16 at 5:24
0

I figured out the basic issue, but on a different kernel.

  • The basic issue is that kernel-develop on RHEL or linux-headers-generic on debian is only useful if you have a generic kernel. CoreOS here is using a custom kernel.

  • I was not able to track down how to get a working equivalent to linux-headers-generic on CoreOS. I'm sure it's possible with enough internet archeology since it's GPLed.

  • It was also pointless to try to do this on GitLabs CoreOS in Docker in the first place because VirtualBox would've needed the kernel module to be loaded on the Docker host which I don't have access to. (as far as I gather)

  • Switching kernel to a generic one also isn't always possible.

Instead I went and got a dedicated host. Which in turn had a custom kernel which has the same basic issue.

The answer is really to find the modifications made to the kernel and prepare that into /usr/src like here:

https://github.com/scaleway/kernel-tools#how-to-build-a-custom-kernel-module

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.