Ticket #3934 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

vboxdrv init script makes boot slow => Fixed in SVN

Reported by: kcarnold Owned by:
Priority: minor Component: host support
Version: VirtualBox 2.2.2 Keywords: boot, vboxdrv, init, slow, find, grep
Cc: Guest type: other
Host type: Linux


According to bootchart, the vboxdrv init script wastes over 2 seconds on my machine running find in the module tree before trying modprobe. Why not just try modprobe first?

Here's how I modified that section of vboxdrv. But I'm sure you could do a whole lot better:

    if ! running vboxdrv; then
        if ! modprobe vboxdrv > /dev/null 2>&1; then
	    # modprobe failed. Find out why:
            if ! find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
		failure "No suitable module for running kernel found"
            failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
        sleep .2

Change History

comment:1 Changed 7 years ago by frank

  • Summary changed from vboxdrv init script makes boot slow to vboxdrv init script makes boot slow => Fixed in SVN

You are completely right. I've removed the code which was trying to find the module.

comment:2 Changed 6 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use