kernel-5.6 compile options for VirtualBox-6.1.6

Discussions about using Linux guests in VirtualBox.
Post Reply
titmouse
Posts: 4
Joined: 21. Feb 2020, 09:52

kernel-5.6 compile options for VirtualBox-6.1.6

Post by titmouse »

Hi!

What are Linux kernel-5.6 compile options regarding VirtualBox-6.1.6

I've copied .config file from kernel-5.4.15 I compiled and working ,to kernel-5.6.4 source tree.
After

Code: Select all

make oldconfig
, I compiled and installed kernel-5.6.4.
After reboot to that kernel, VBOX linux guest additions compiled with error message
wrong kernel compile options
and no modules were installed.

So kernel compile options are correct for kernel-5.4.15, guest additions compile and modules are created and loaded. All works.
Same .config from kernel-5.4.15 and upgraded (make oldconfig) to kernel-5.6.4, the guest additions do not compile.

I know, that kernel-5.6.4 source includes code for compiling Virtualbox modules.

How to compile kernel-5.6.4 to use it in a linux guest?

There are now two possibilities:
1. compile kernel included Virtualbox modules and disable Virtualbox own modules (how)?
2. compile kernel with virualbox support but without modules and let Virtualbox additions to compile modules

Which variant is better and what are kernel-5.6 compile options regarding both variants?
titmouse
Posts: 4
Joined: 21. Feb 2020, 09:52

Re: kernel-5.6 compile options for VirtualBox-6.1.6

Post by titmouse »

:( Nobody interested to answer?
There is nobody compiling Linux kernel? Is that possible? :?:
Chris_E
Posts: 1
Joined: 27. Apr 2020, 15:26

Re: kernel-5.6 compile options for VirtualBox-6.1.6

Post by Chris_E »

I use Slackware 14.2 32bit. No trouble compiling new kernels.
I started with the original copied to /usr/src/linux-5.X.Y/.config and then ran 'make olddefconfig'
make, make modules_install, make install ran without errors
I've used VBox 5.X, 6.0.X, 6.1.X, kernels 5.3, 5.4, 5.6
System builds new modules for VBox on restart.
Currently trying on Bionic 32bit as not more upgrades are avaliable from Canonical.

Just finished 5.6.7 on Bionic MATE
Additional things to do after 'make modules_install' but before 'make install'
cd to /lib/modules/<new kernel version>
find . -iname "*.ko" -print -exec strip --strip-unneeded {} \; (check this line for spelling mistakes)
edit /etc/initramfs-tools/initramfs.conf and change 'MODULES=most' to 'MODULES=dep'
Then you can do 'make install' - which should do 'update-initramfs' and 'update-grub'
If not do these before reboot.
titmouse
Posts: 4
Joined: 21. Feb 2020, 09:52

Re: kernel-5.6 compile options for VirtualBox-6.1.6

Post by titmouse »

After a huge amount of time spent and asking on other forum, I finally found a solution.
The blame is on Oracle.
A few versions of a VirtualBox ago, Oracle VBOX GA installer do not check, if previous version is installed. It simply compile already installed version. :( :evil:
So I discovered that at boot time try to compile modules for 6.1.2. VBOX guest additions of that version is not compatible with Linux kernel-5.6, so I got error.
I had to go to VBOX GA source and run uninstall.sh, reboot and after that installer compiles and install new modules.

The right VBOX guest additions installer behavior would be: check if previous version is installed, remove it and install a current one.
Post Reply