Siduction Forum

Siduction Forum => Upgrade Warnings => Topic started by: melmarker on 2017/11/14, 01:09:56

Title: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: melmarker on 2017/11/14, 01:09:56
there is a patch needed to build the modules:
https://gist.github.com/herbmillerjr/039c129e9c25b047b906e19ad1f23a59
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: samoht on 2017/11/14, 08:38:41
Many thanks, @melmarker  :)
Greetings,
Tom
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: vayu on 2017/11/15, 01:56:28
How do I apply it?
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: samoht on 2017/11/15, 02:03:43
Please have a look at
https://forum.siduction.org/index.php?topic=6918.msg56185#msg56185 (https://forum.siduction.org/index.php?topic=6918.msg56185#msg56185)

Unfortunately in German, but the code is in English  ;) .

Greetings,
Tom
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: towo on 2017/11/15, 07:00:55
http://paste.debian.net/995817/

That's the patch which i have from the vbox-dev mailing list.
I'm using it since a long time.
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: vilde on 2017/11/15, 10:15:10
http://paste.debian.net/995817/ (http://paste.debian.net/995817/)

That's the patch which i have from the vbox-dev mailing list.
I'm using it since a long time.

Excuse me for not understanding what this is about, I have VB 5.2 and no problem, should there be a problem?

Towo you write you are using the patch, in our kernel or? If so, that's why I don't have a problem probably ;)
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: towo on 2017/11/15, 12:06:54
No, the patch is vor vbox modules, not for the kernel.
It's nessesary for vbox 5.2 from oracle. I think the debian version has that patch included.
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: whistler_mb on 2017/11/15, 14:51:48
This patch is also necessary for virtualbox 5.2 from debian.

Code: [Select]
$ apt-cache policy virtualbox-dkms
virtualbox-dkms:
  Installiert:           5.2.0-dfsg-5
  Installationskandidat: 5.2.0-dfsg-5
  Versionstabelle:
 *** 5.2.0-dfsg-5 500
        500 http://ftp.de.debian.org/debian unstable/contrib amd64 Packages
        500 http://ftp.de.debian.org/debian unstable/contrib i386 Packages
        100 /var/lib/dpkg/status
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: tomsiduction on 2017/11/15, 23:09:39
Hello
I am new on siduction (an virtualbox is not running)

I would like to ask a question:
I have virtual-box sources installed.
But I have no
/usr/share/virtualbox/src on my machine

But I have
/usr/src/virtualbox-5.2.0

a patch gives me an error:

root@siduction:/usr/src/virtualbox-5.2.0# patch -Np0  < virtualbox-modules-5.1.28-udp.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/work/vboxnetflt/linux/VBoxNetFlt-linux.c b/work/vboxnetflt/linux/VBoxNetFlt-linux.c
|index f824654..b61d82c 100644
|--- work/vboxnetflt/linux/VBoxNetFlt-linux.c
|+++ work/vboxnetflt/linux/VBoxNetFlt-linux.c
--------------------------
File to patch:

Any idea what went wrong?


Thank you very much
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: vayu on 2017/11/16, 02:25:03
I got the patch working, how do I recompile the kernel modules for 4.14 with dkms?

[Edit] I got the modules compiled with the 4.14 kernel with this:
Code: [Select]
#  dkms install virtualbox/5.2.0 -k 4.14.0-towo.1-siduction-amd64that's   dkms install  module/version -k kernel
Some of my experiences with the patch:
My source files were in /usr/src/virtualbox-5.2.0/  In that directory there were the directories vboxnetflt and vboxpci. In each of those there was a linux directory. In the linux directories the files did have -linux in their names.  So the target files were in the following paths: /usr/src/virtualbox-5.2.0/vboxnetflt/linux/VBoxNetFlt-linux.c and /usr/src/virtualbox-5.2.0/vboxpci/linux/VBoxPci-linux.c. 
I took this patch here: https://gist.github.com/herbmillerjr/039c129e9c25b047b906e19ad1f23a59 (https://gist.github.com/herbmillerjr/039c129e9c25b047b906e19ad1f23a59)
and named it vbox.patch.  I put the patch file and made my current directory in /usr/src/virtualbox-5.2.0. 

I ran
Code: [Select]
#  patch -Np1 < vbox.patchI used p1 because the path in the patch file had one folder level that I didn't have, "work/", everything else matched.
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: bevo on 2017/11/16, 09:33:12
@vayu
Finally ! That worked for me  :)

Many thanks vayu !

bevo
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: tomsiduction on 2017/11/16, 13:49:52
@vayu

Thank you very much - that worked

root@siduction:/usr/src/virtualbox-5.2.0#  patch -Np1 < vbox.patch
patching file vboxnetflt/linux/VBoxNetFlt-linux.c
Hunk #1 succeeded at 141 (offset 15 lines).
patching file vboxpci/linux/VBoxPci-linux.c



That was a big help


Now:
When running virtual box I get a

"
Für die virtuelle Maschine xp konnte keine neue Sitzung eröffnet werden.

Failed to open/create the internal network 'HostInterfaceNetworking-wlp10s0' (you might need to modprobe vboxnetflt to make it accessible) (VERR_SUPDRV_COMPONENT_NOT_FOUND).

Please install the virtualbox-dkms package and execute 'modprobe vboxdrv' as root (VERR_SUPDRV_COMPONENT_NOT_FOUND).

Fehlercode:NS_ERROR_FAILURE (0x80004005)
Komponente:ConsoleWrap
Interface:IConsole {872da645-4a9b-1727-bee2-5585105b9eed}"

Deactivating Network allows me to run the virtual machine (without Network)

Is there a second patch to fix that?

Thank you

Edit:
I patched again with the patch from "towo"  got a

"root@siduction:/usr/src/virtualbox-5.2.0#  patch -Np1 < virtualbox-modules-5.1.28-udp.patch
patching file vboxnetflt/linux/VBoxNetFlt-linux.c
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file vboxnetflt/linux/VBoxNetFlt-linux.c.rej
patching file vboxpci/linux/VBoxPci-linux.c
patch unexpectedly ends in middle of line
Reversed (or previously applied) patch detected!  Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file vboxpci/linux/VBoxPci-linux.c.rej"

and now the virtualbox is starting with activated network

Thank you to everybody helping
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: krisbee on 2017/11/16, 18:12:58
Thanks for guide. Applied patch as described, after du to 4.14 kernal and modules build OK.

Code: [Select]
root@sweep:/usr/src/virtualbox-5.2.0#  patch -Np1 < virtualbox-modules-5.1.28-udp.patch
patching file vboxnetflt/linux/VBoxNetFlt-linux.c
Hunk #1 succeeded at 141 (offset 15 lines).
patching file vboxpci/linux/VBoxPci-linux.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 353 with fuzz 2.
root@sweep:/usr/src/virtualbox-5.2.0#
root@sweep:/# dkms status
virtualbox, 5.2.0, 4.13.11-towo.1-siduction-amd64, x86_64: installed                                                                                         
virtualbox, 5.2.0, 4.14.0-towo.1-siduction-amd64, x86_64: installed


About to reboot and test vbox.   Seems Ok, no error found in either using a bridged network or internal network in Vboxx.
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: vilde on 2017/11/25, 00:16:45
New virtualbox on today's d-u, patch didn't work for me, is there a new patch?
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: McBane on 2017/11/25, 00:22:12
There is a regression in the latest 5.2.2 package, see here (https://forum.siduction.org/index.php?topic=6905.msg56296#msg56296).


So far, I couldn't find a working patch yet. The old one isn't compatible.
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: Camelot on 2017/11/25, 11:26:29
Fix vor virtualbox 5.2.2:

Code: [Select]
/usr/src/virtualbox-5.2.2/vboxpci/linux/VBoxPci-linux.c

#include <iprt/string.h>
#include <iprt/mem.h>

-#include "VBoxPciInternal.h"
+#include "../VBoxPciInternal.h"

#ifdef VBOX_WITH_IOMMU
# include <linux/dmar.h>

then dpkg-reconfigure virtualbox-dkms

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882647#10

I tested, it's work with 4.14.1-towo.2-siduction-amd64
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: vilde on 2017/11/25, 11:41:27
Fix vor virtualbox 5.2.2:

Code: [Select]
/usr/src/virtualbox-5.2.2/vboxpci/linux/VBoxPci-linux.c

#include <iprt/string.h>
#include <iprt/mem.h>

-#include "VBoxPciInternal.h"
+#include "../VBoxPciInternal.h"

#ifdef VBOX_WITH_IOMMU
# include <linux/dmar.h>

then dpkg-reconfigure virtualbox-dkms

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882647#10 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882647#10)

I tested, it's work with 4.14.1-towo.2-siduction-amd64

Thanks, worked for me to :)
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: McBane on 2017/11/25, 14:04:14
Fix vor virtualbox 5.2.2:

Code: [Select]
/usr/src/virtualbox-5.2.2/vboxpci/linux/VBoxPci-linux.c

#include <iprt/string.h>
#include <iprt/mem.h>

-#include "VBoxPciInternal.h"
+#include "../VBoxPciInternal.h"

#ifdef VBOX_WITH_IOMMU
# include <linux/dmar.h>

then dpkg-reconfigure virtualbox-dkms

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882647#10 (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=882647#10)

I tested, it's work with 4.14.1-towo.2-siduction-amd64


Worked. Thanks!
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: Camelot on 2017/11/26, 11:13:07
It is solved again…
With today virtualbox* 5.2.2-dfsg-2 worked without extra patch.
Title: Re: Virtualbox 5.1.28/ 5.2 and 4.14
Post by: tomsiduction on 2017/11/26, 14:52:17
Thank you very much for the Information