Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
clivesayOffline
Post subject: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 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.
 
 View user's profile Send private message  
Reply with quote Back to top
towoOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 29.09.2010, 18:33



Joined: 2010-09-13
Posts: 499
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.
 
 View user's profile Send private message  
Reply with quote Back to top
clivesayOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 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
 
 View user's profile Send private message  
Reply with quote Back to top
Mr.KlijnOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 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
 
 View user's profile Send private message  
Reply with quote Back to top
HennROffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 02.10.2010, 15:46



Joined: 2010-09-27
Posts: 55

Status: Offline
@Mr.Klijn

Pretty cool idea, will give it a try!
 
 View user's profile Send private message  
Reply with quote Back to top
clivesayOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 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?
 
 View user's profile Send private message  
Reply with quote Back to top
Mr.KlijnOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 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
 
 View user's profile Send private message  
Reply with quote Back to top
slamOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 05.10.2010, 09:12
Team Member


Joined: 1970-01-01
Posts: 607
Location: w3
Status: Offline
Works perfectly, nice little hack.
Greetings,
Chris

_________________
an operating system must operate
development is life
my Debian repo
 
 View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number 
Reply with quote Back to top
CrustOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 05.10.2010, 16:42



Joined: 2010-09-12
Posts: 30

Status: Offline
What a great idea.
 
 View user's profile Send private message  
Reply with quote Back to top
LatOffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 09.10.2010, 15:43



Joined: 2010-09-19
Posts: 167

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?
 
 View user's profile Send private message  
Reply with quote Back to top
HennROffline
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 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
 
 View user's profile Send private message  
Reply with quote Back to top
muchan
Post subject: RE: Auto rebuild of Virtualbox NonOSE driver  PostPosted: 21.10.2010, 13:13
Moderator


Joined: 2010-09-11
Posts: 468

I use ose without the script, only dkms the debian way (the aptosid manual way)

edit: not yet updated to 2.6.36. so not yet encountered the problem described in
http://aptosid.com/index.php?name=PNphp ... =2172#2172
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio