Author |
Message |
clivesay
|
|
Post subject: Auto rebuild of Virtualbox NonOSE driver
Posted: 29.09.2010, 18:32
|
|

Joined: 2010-09-12
Posts: 14
Status: Offline
|
|
I have been doing some searching but maybe not wording the question correctly.
Anyone have any hints on how I can get the nonOSE vbox driver to build automatically at boot when a new kernel is installed?
slh is building them so quickly I find myself constantly rebuilding.
Thanks. |
|
|
|
|
 |
towo
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 29.09.2010, 18:33
|
|

Joined: 2010-09-13
Posts: 522
Location: Pößneck / Thüringen
Status: Offline
|
|
There is no automatic way besides of using dkms.
But dkms is crap and the actual version in sid is triggering wrong. |
|
|
|
|
 |
clivesay
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 29.09.2010, 18:40
|
|

Joined: 2010-09-12
Posts: 14
Status: Offline
|
|
Ok, thanks towo. It's not a big deal just wondered if I was doing something manual unnecessarily.
Chris |
|
|
|
|
 |
Mr.Klijn
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 01.10.2010, 06:29
|
|

Joined: 2010-09-11
Posts: 9
Status: Offline
|
|
Hi clivesay,
I'm using a 'one-liner' in /etc/rc.local to check for a vboxdrv.ko for the current used kernel. If the 'one-liner' finds a matching vboxdrv.ko then nothing will happen; if there is no matching vboxdrv.ko (a new kernel) then the script '/etc/init.d/vboxdrv setup' will start.
Insert the 'one-liner' before 'exit 0' in the script /etc/rc.local as shown here:
Code:
/- cut -/
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
if [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ] ; then /etc/init.d/vboxdrv setup ; fi
exit 0
|
_________________ Regards
Mr.Klijn
|
|
|
|
 |
HennR
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 02.10.2010, 15:46
|
|

Joined: 2010-09-27
Posts: 55
Status: Offline
|
|
@Mr.Klijn
Pretty cool idea, will give it a try! |
|
|
|
|
 |
clivesay
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 04.10.2010, 23:59
|
|

Joined: 2010-09-12
Posts: 14
Status: Offline
|
|
I tried it but nothing happened. I put it in a command box to watch it and just returns me to a prompt when I hit enter. Am I missing something? |
|
|
|
|
 |
Mr.Klijn
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 05.10.2010, 09:07
|
|

Joined: 2010-09-11
Posts: 9
Status: Offline
|
|
Hi clivesay,
If you have inserted the line
Code:
if [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ] ; then /etc/init.d/vboxdrv setup ; fi
in the script /etc/rc.local as shown above then everything should be okay.
If you have already installed a valid driver, then you really see nothing.
It is different when a new kernel is installed. During the boot up of the computer, you see the error message that the vboxdrv.ko does not exist. The script /etc/rc.local is executed at the end of the boot phase and the appropriate driver is then built.
To test the one-liner you must first remove the currently used virtualbox driver (as root):
Code:
rm /lib/modules/`uname -r`/misc/vboxdrv.ko
if [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ] ; then /etc/init.d/vboxdrv setup ; fi
Now you see the output of the script '/etc/init.d/vboxdrv setup' and the new driver is built. |
_________________ Regards
Mr.Klijn
|
|
|
|
 |
slam
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 05.10.2010, 09:12
|
|
Team Member

Joined: 1970-01-01
Posts: 607
Location: w3
Status: Offline
|
|
|
|
 |
Crust
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 05.10.2010, 16:42
|
|

Joined: 2010-09-12
Posts: 30
Status: Offline
|
|
|
|
 |
Lat
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 09.10.2010, 15:43
|
|

Joined: 2010-09-19
Posts: 205
Status: Offline
|
|
I don't like to touch system files because I forget where I did custom modifications so I added a message and a test in case virtualbox has been uninstalled
Code:
# Auto rebuild of Virtualbox NonOSE module
# By Mr. Klijn - modified by Lat
echo " /etc/rc.local is checking for the vboxdrv module if needed"
if [ ! -e /lib/modules/`uname -r`/misc/vboxdrv.ko ] ; then
[ -x /etc/init.d/vboxdrv ] && /etc/init.d/vboxdrv setup || echo " Is virtualbox installed?"
fi
# end Auto rebuild of Virtualbox NonOSE module
BTW, I have
Code:
# needed for Virtualbox non-ose
/etc/init.d/vboxdrv force-reload
is that still needed? |
|
|
|
|
 |
HennR
|
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 21.10.2010, 08:37
|
|

Joined: 2010-09-27
Posts: 55
Status: Offline
|
|
Are you guys using the ose of virtualbox version?
I don't have a script under /etc/init.d/ called vboxdrv
And my modules are saved under these kind of paths:
/lib/modules/`uname -r`/updates/dkms/vboxdrv.ko |
|
|
|
|
 |
|
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver
Posted: 21.10.2010, 13:13
|
|
Moderator

Joined: 2010-09-11
Posts: 469
|
|
|
|
 |
|