crouton: Installing Virtualbox - wrong kernel version after building headers?
chronos@localhost / $ sudo edit-chroot -all
name: trusty
encrypted: no
Entering /mnt/stateful_partition/crouton/chroots/trusty...
crouton: version 1-20160518095657~master:fd37bb79
release: trusty
architecture: amd64
xmethod: xorg
targets: keyboard,xfce,touch,extension
host: version 8459.0.0 (Official Build) dev-channel cyan
kernel: Linux localhost 3.18.0-12438-gfa5c4dd #1 SMP PREEMPT Wed Jun 15 19:01:06 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux
freon: yes
Unmounting /mnt/stateful_partition/crouton/chroots/trusty...
I’m trying to install Virtualbox on my Acer Chromebook R11
$ uname -r
3.18.0-12438-gfa5c4dd
i cloned the source for 3.18 and followed the steps in the Build kernel headers and install Virtualbox wiki page. everything went successful, but the kernel and image files are named like this:
linux-headers-3.18.0-12453-g22f7042-dirty_3.18.0-12453-g22f7042-dirty-10.00.Custom_amd64.deb
linux-image-3.18.0-12453-g22f7042-dirty_3.18.0-12453-g22f7042-dirty-10.00.Custom_amd64.deb
So, the version appendix is 12453 instead of 12438
I think this leads to the following error, when trying to install the virtualbox modules with modprobe:
$ modprobe vboxdrv
bash: modprobe: command not found
(trusty)pitey@localhost:~/kernel$ sudo modprobe vboxdrv
modprobe: ERROR: ../libkmod/libkmod.c:507 kmod_lookup_alias_from_builtin_file() could not open builtin file '/lib/modules/3.18.0-12438-gfa5c4dd/modules.builtin.bin'
modprobe: FATAL: Module vboxdrv not found.
Running /etc/init.d/vboxdrv setup gives the following:
$ sudo /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMSError! Your kernel headers for kernel 3.18.0-12438-gfa5c4dd cannot be found.
Please install the linux-headers-3.18.0-12438-gfa5c4dd package,
or use the --kernelsourcedir option to tell DKMS where it's located
...failed!
(Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)
(trusty)pitey@localhost:~/kernel$
My understanding is, that the kernel headers and modules I build are newer than the actual kernel in my chromebook. Can i point to the correct version number when building? or do I have to build the complete kernel from source?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (2 by maintainers)
So what I finally was able to replicate for myself, end-to-end, was basically divx118’s method to build the headers and packages using make-kpkg, with a slight twist. Edit the file scripts/setlocalversion, search for the text “-dirty”, and remark out the conditional statements in which you find the reference; there should be a case statement and an if statement. Finish building the packages using make-kpkg, and the name of the .deb package and the installed name under /lib/modules will not have “-dirty” in them. Building and installing the vboxdrv modules with VirtualBox should match the installed kernel exactly and work.
I updated the wiki page with these instructions, and the instructions on getting prior versions of the kernel source.