Kernel 4.4.172 on Slackware64 and VirtualBox

In my previous post, I mentioned that I had issues with NVIDIA after updating the kernel to 4.4.172 from Security Advisories. It appears that this kernel update is breaking some applications for many people. For me, it broke NVIDIA video driver and now I found that I can't run VirtualBox.

When I execute the virtualbox command, it complained about vboxdrv not running. Then, when I tried to start vboxdrv, it said vboxdrv not found! # /etc/rc.d/rc.vboxdrv start bash: /etc/rc.d/rc.vboxdrv: No such file or directory

After looking for a solution in linuxquestions.org and other sites, I ended up following the instruction from SlackBlogs.

Disclaimer:
The information in this site is the result of my researches in the Internet and of my experiences. This information below is solely used for my purpose and may not be suitable for others.

Download the virtualbox binary:

Download the source binary from VirtualBox site. Choose for All distributions, then execute it as root. The installation will fail but don't worry about it.# sh VirtualBox-6.0.4-128413-Linux_amd64.run ...

Update the source code:

Open the source code for /usr/src/vboxhost-6.0.4/vboxdrv/r0drv/linux/memobj-r0drv-linux.c with your favorite editor, look for below lines and update it with new KERNEL_VERSION(4, 4, 168). There are three locations you'd need to update.# nvim /usr/src/vboxhost-6.0.4/vboxdrv/r0drv/linux/memobj-r0drv-linux.c ... if GET_USER_PAGES_API >= KERNEL_VERSION(4, 9, 0) <-- Change the kernel version to KERNEL_VERSION(4, 4, 168) fWrite ? FOLL_WRITE | /* Write to memory. */ FOLL_FORCE /* force write access. */ : 0, /* Write to memory. */

Restart the setup process:

Now, execute the /sbin/vboxconfig as root to re-start the setup process:# /sbin/vboxconfig vboxdrv.sh: Stopping VirtualBox services. vboxdrv.sh: Starting VirtualBox services. vboxdrv.sh: Building VirtualBox kernel modules. vboxdrv.sh: Starting VirtualBox services. ... #

Run vboxdrv:

So far so good. It's now the moment of the truth. If I can get vboxdrv running, it's all set:# /etc/rc.d/rc.vboxdrv start Starting VirtualBox kernel modules ...done. #

Hooray! it's working. In fact, I can bring up VirtualBox. All I need to do is to update their Guest Addition images to the latest.

That's all!
-gibb

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>