You are not logged in.

#1 2015-07-13 17:59:29

Stevearch
Member
From: North Wales
Registered: 2014-04-21
Posts: 80

Custom Kernel & Virtualbox modules [solved]

Hey guys,

Hope you can help.

I run a custom Kernel and I'm having issues getting the Virtualbox modules to load.

 [stephen@Xen ~]$ uname -a
Linux Xen 4.0.0-ck1-ARCH-Stephen-BFS #1 SMP PREEMPT Sun Jul 12 14:02:47 BST 2015 x86_64 GNU/Linux 

I've followed the Arch guide detailed here: https://wiki.archlinux.org/index.php/Vi … al_machine
And I can boot into the OS with full screen support working nicely.

However - The vbox modules (vboxguest, vboxsf, vboxvideo) are failing to load.

 
[stephen@Xen ~]$ lsmod | grep vb
[stephen@Xen ~]$ 
[stephen@Xen ~]$ modprobe -a vboxguest
modprobe: WARNING: Module vboxguest not found.
[stephen@Xen ~]$ 

I have all the correct packages installed as you can see -

 
[stephen@Xen ~]$ pacman -Q virtualbox-guest-utils && pacman -Q virtualbox-guest-dkms && pacman -Q vboxguest-hook
virtualbox-guest-utils 4.3.28-1
virtualbox-guest-dkms 4.3.28-1
vboxguest-hook 1.0-2
[stephen@Xen ~]$ 

I followed the guide to install Virtualbox into DKMS and add the hook to my mkinitcpio as you can see -

 
[stephen@Xen ~]$ sudo cat /etc/mkinitcpio.conf 
[sudo] password for stephen: 
# vim:set ft=sh
# MODULES
# The following modules are loaded before any boot hooks are
# run.  Advanced users may wish to specify all system modules
# in this array.  For instance:
#     MODULES="piix ide_disk reiserfs"
MODULES=""

# BINARIES
# This setting includes any additional binaries a given user may
# wish into the CPIO image.  This is run last, so it may be used to
# override the actual binaries included by a given hook
# BINARIES are dependency parsed, so you may safely ignore libraries
BINARIES=""

# FILES
# This setting is similar to BINARIES above, however, files are added
# as-is and are not parsed in any way.  This is useful for config files.
FILES=""

# HOOKS
# This is the most important setting in this file.  The HOOKS control the
# modules and scripts added to the image, and what happens at boot time.
# Order is important, and it is recommended that you do not change the
# order in which HOOKS are added.  Run 'mkinitcpio -H <hook name>' for
# help on a given hook.
# 'base' is _required_ unless you know precisely what you are doing.
# 'udev' is _required_ in order to automatically load modules
# 'filesystems' is _required_ unless you specify your fs modules in MODULES
# Examples:
##   This setup specifies all modules in the MODULES setting above.
##   No raid, lvm2, or encrypted root is needed.
#    HOOKS="base"
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS="base udev autodetect block filesystems"
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS="base udev block filesystems"
#
##   This setup assembles a pata mdadm array with an encrypted root FS.
##   Note: See 'mkinitcpio -H mdadm' for more information on raid devices.
#    HOOKS="base udev block mdadm encrypt filesystems"
#
##   This setup loads an lvm2 volume group on a usb device.
#    HOOKS="base udev block lvm2 filesystems"
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr, fsck and shutdown hooks.
HOOKS="base udev autodetect modconf block filesystems keyboard fsck vboxguest"

Any idea's guys?

Apologies if there is any information missing, any help is really appreciated smile

Last edited by Stevearch (2015-07-13 21:04:09)

Offline

#2 2015-07-13 18:10:58

Tambalamba
Member
Registered: 2015-03-13
Posts: 45

Re: Custom Kernel & Virtualbox modules [solved]

Did you create

/etc/modules-load.d/virtualbox.conf

with

vboxdrv

https://wiki.archlinux.org/index.php/Vi … el_modules

Offline

#3 2015-07-13 18:17:36

Stevearch
Member
From: North Wales
Registered: 2014-04-21
Posts: 80

Re: Custom Kernel & Virtualbox modules [solved]

Tambalamba wrote:

Did you create

/etc/modules-load.d/virtualbox.conf

with

vboxdrv

https://wiki.archlinux.org/index.php/Vi … el_modules

Hey smile

This is for an Arch guest,

But here is the file I have anyway -

[stephen@Xen modules-load.d]$ pwd
/etc/modules-load.d
[stephen@Xen modules-load.d]$ ls
virtualbox.conf
[stephen@Xen modules-load.d]$ cat virtualbox.conf 
vboxguest
vboxsf
vboxvideo
[stephen@Xen modules-load.d]$ 

Last edited by Stevearch (2015-07-13 18:18:34)

Offline

#4 2015-07-13 18:40:10

Tambalamba
Member
Registered: 2015-03-13
Posts: 45

Re: Custom Kernel & Virtualbox modules [solved]

I can't see host modules:

Stevearch wrote:

$ pacman -Q virtualbox-guest-utils && pacman -Q virtualbox-guest-dkms && pacman -Q vboxguest-hook
virtualbox-guest-utils 4.3.28-1
virtualbox-guest-dkms 4.3.28-1
vboxguest-hook 1.0-2

I think you should install:

virtualbox-host-dkms

and

virtualbox-host-modules

EDIT: Sorry, I didn't notice it's for an Arch guest.

Last edited by Tambalamba (2015-07-13 20:02:36)

Offline

#5 2015-07-13 18:53:41

Stevearch
Member
From: North Wales
Registered: 2014-04-21
Posts: 80

Re: Custom Kernel & Virtualbox modules [solved]

Tambalamba wrote:

I can't see host modules:

Stevearch wrote:

$ pacman -Q virtualbox-guest-utils && pacman -Q virtualbox-guest-dkms && pacman -Q vboxguest-hook
virtualbox-guest-utils 4.3.28-1
virtualbox-guest-dkms 4.3.28-1
vboxguest-hook 1.0-2

I think you should install:

virtualbox-host-dkms

and

virtualbox-host-modules

This is a Guest running under Windows 8.1
The host modules should not be necessary.

Thanks for your help though.

Last edited by Stevearch (2015-07-13 19:03:01)

Offline

#6 2015-07-13 20:06:12

Tutti
Member
Registered: 2015-02-26
Posts: 117

Re: Custom Kernel & Virtualbox modules [solved]

Have you generated the kernel modules?

Offline

#7 2015-07-13 20:09:41

Stevearch
Member
From: North Wales
Registered: 2014-04-21
Posts: 80

Re: Custom Kernel & Virtualbox modules [solved]

Tutti wrote:

Have you generated the kernel modules?

Hey,

Could you clarify what you mean by 'generated the kernel modules' ?

Sorry if I'm missing something obvious.

Offline

#8 2015-07-13 20:21:25

Tambalamba
Member
Registered: 2015-03-13
Posts: 45

Re: Custom Kernel & Virtualbox modules [solved]

I think these:

https://wiki.archlinux.org/index.php/Vi … el_modules

Sorry, I made a mistake a few minutes ago - these should be the correct modules.

Last edited by Tambalamba (2015-07-13 20:37:31)

Offline

#9 2015-07-13 20:41:15

Stevearch
Member
From: North Wales
Registered: 2014-04-21
Posts: 80

Re: Custom Kernel & Virtualbox modules [solved]

Tambalamba wrote:

I think these:

https://wiki.archlinux.org/index.php/Vi … el_modules

Sorry, I made a mistake a few minutes ago - these should be the correct modules.

Yep, but those are the ones I can't load.

[stephen@Xen ~]$ modprobe -a vboxguest
modprobe: WARNING: Module vboxguest not found

Offline

#10 2015-07-13 20:48:42

Tutti
Member
Registered: 2015-02-26
Posts: 117

Re: Custom Kernel & Virtualbox modules [solved]

Stevearch wrote:
Tutti wrote:

Have you generated the kernel modules?

Hey,

Could you clarify what you mean by 'generated the kernel modules' ?

Sorry if I'm missing something obvious.

I believe you do not have the vbox modules on your system, and need to generate/compile them yourself since you use a custom kernel (though the wiki is IMO confusing on this).

Have you followed this: https://wiki.archlinux.org/index.php/Vi … tom_kernel, which refer to this: https://wiki.archlinux.org/index.php/Vi … tom_kernel for more information? (with the changes detailed in the first link)

If I'm correct doing this will create: vboxguest, vboxsf and vboxvideo.

edited for readability.

Last edited by Tutti (2015-07-13 20:55:59)

Offline

#11 2015-07-13 20:58:09

Stevearch
Member
From: North Wales
Registered: 2014-04-21
Posts: 80

Re: Custom Kernel & Virtualbox modules [solved]

Tutti wrote:
Stevearch wrote:
Tutti wrote:

Have you generated the kernel modules?

Hey,

Could you clarify what you mean by 'generated the kernel modules' ?

Sorry if I'm missing something obvious.

I believe you do not have the vbox modules on your system, and need to generate/compile them yourself since you use a custom kernel (though the wiki is IMO confusing on this).

Have you followed this: https://wiki.archlinux.org/index.php/Vi … tom_kernel, which refer to this: https://wiki.archlinux.org/index.php/Vi … tom_kernel for more information? (with the changes detailed in the first link)

If I'm correct doing this will create: vboxguest, vboxsf and vboxvideo.

edited for readability.

Thank you for claifying.

I've just ran this -

[stephen@Xen ~]$ sudo dkms install vboxguest/4.3.28 -k 4.0.0-ck1-ARCH-Stephen-BFS/x86_64
[sudo] password for stephen: 

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area....
make KERNELRELEASE=4.0.0-ck1-ARCH-Stephen-BFS -C /usr/lib/modules/4.0.0-ck1-ARCH-Stephen-BFS/build M=/var/lib/dkms/vboxguest/4.3.28/build............
cleaning build area....

DKMS: build completed.

vboxguest.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/4.0.0-ck1-ARCH-Stephen-BFS/kernel/misc/

vboxsf.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/4.0.0-ck1-ARCH-Stephen-BFS/kernel/misc/

vboxvideo.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /usr/lib/modules/4.0.0-ck1-ARCH-Stephen-BFS/kernel/misc/

depmod.....

DKMS: install completed.
[stephen@Xen ~]$ 

Let me reboot and see what happens.

Offline

#12 2015-07-13 21:03:27

Stevearch
Member
From: North Wales
Registered: 2014-04-21
Posts: 80

Re: Custom Kernel & Virtualbox modules [solved]

Tutti wrote:
Stevearch wrote:
Tutti wrote:

Have you generated the kernel modules?

Hey,

Could you clarify what you mean by 'generated the kernel modules' ?

Sorry if I'm missing something obvious.

I believe you do not have the vbox modules on your system, and need to generate/compile them yourself since you use a custom kernel (though the wiki is IMO confusing on this).

Have you followed this: https://wiki.archlinux.org/index.php/Vi … tom_kernel, which refer to this: https://wiki.archlinux.org/index.php/Vi … tom_kernel for more information? (with the changes detailed in the first link)

If I'm correct doing this will create: vboxguest, vboxsf and vboxvideo.

edited for readability.

You sir are a genius!

[stephen@Xen ~]$ lsmod | grep v
vfat                   24576  1
fat                    65536  1 vfat
ppdev                  20480  0
parport                36864  2 ppdev,parport_pc
joydev                 20480  0
mousedev               20480  0
video                  24576  0
evdev                  24576  18
vboxvideo              16384  3
drm                   282624  5 vboxvideo <--- WOOHOO!
vboxsf                 45056  0 <--- WOOHOO!
vboxguest             208896  2 vboxsf <--- WOOHOO!

It works!!

You are correct the Arch wiki is very unclear on this point.
I may give it an edit tomorrow as I can't be the only one that's got confused at this part. (or maybe im just a newb big_smile)

Thank you so much for your help.

Offline

Board footer

Powered by FluxBB