Skip to content

Instantly share code, notes, and snippets.

@PartTimeLegend
Last active September 24, 2019 01:44
Show Gist options
  • Select an option

  • Save PartTimeLegend/5328700 to your computer and use it in GitHub Desktop.

Select an option

Save PartTimeLegend/5328700 to your computer and use it in GitHub Desktop.
/etc/init.d/vboxdrv setup Not Found - VirtualBox Fix!

#/etc/init.d/vboxdrv setup Not Found - VirtualBox Fix!

When setting up Virtual Box I was faced with the immortal error telling me to run sudo /etc/init.d/vboxdrv setup. Simple enough, until you're told it doesn't exist.

Thus began my fight to get it working. The fix is here in the hope that it helps someone else.

To follow this guide you need to have a basic understanding of shell commands. If you don't, then just be careful.

First off I like aptitute so let's install it.

sudo apt-get install aptitude

Now update.

sudo aptitude update

And upgrade.

sudo aptitude upgrade

Now remove Virtual Box.

sudo aptitude remove virtualbox

Install Virtual Box.

sudo aptitude install virtualbox

Install generic headers.

sudo aptitude install linux-headers-3.5.0-17-generic

Remove dkms. It's bugged at this point.

sudo aptitude remove virtualbox-dkms

Install dkms and it will build. Why does it not do this originally? Who knows?

sudo aptitude install virtualbox-dkms

Now start it. This is where we see the fix for the not found. It's a different file name!

sudo /etc/init.d/virtualbox start

Add your user to the vboxuser group so you can access USB devices.

sudo usermod -aG vboxuser youruser

Finally a reboot.

sudo reboot

There you go all setup and working.

TL;DR

Save and close everything and run this.

sudo apt-get install aptitude && sudo aptitude update && sudo aptitude upgrade && sudo aptitude remove virtualbox && sudo aptitude install virtualbox && sudo aptitude install linux-headers-3.5.0-17-generic && sudo aptitude remove virtualbox-dkms && sudo aptitude install virtualbox-dkms && sudo /etc/init.d/virtualbox start && sudo usermod -aG vboxuser youruser && sudo reboot

@TheGroundZero

Copy link
Copy Markdown

Shouldn't the user group be vboxusers instead of vboxuser (note the plural) ?

BTW: thanks for pointing me to the incorrect file name !
In the end, I did not have dkms installed (although Virtualbox did work for me in the past without it) and I didn't have to reinstall everything. I installed dkms and started the service using the correct filename

@mattlorme

Copy link
Copy Markdown

TY Sir!

@themighty1

Copy link
Copy Markdown

After a kernel upgrade all I had to do was
sudo aptitude reinstall virtualbox-dkms

@gy0857478

Copy link
Copy Markdown

very helpful

@leoborgnino

Copy link
Copy Markdown

Thanks!

@dimaatkaev

Copy link
Copy Markdown

Thank you very mach, it works, you do great job, regards!

@hoajb

hoajb commented Sep 28, 2016

Copy link
Copy Markdown

Thanks. it worked for me.

@fatmas1982

Copy link
Copy Markdown

thank you very much for your huge efforts

@makstheimba

Copy link
Copy Markdown

Thanks a lot

@5pecia1

5pecia1 commented Feb 8, 2017

Copy link
Copy Markdown

Thanks!
You save my time.

@thepipeman

Copy link
Copy Markdown

Hello, when I execute 'sudo /etc/init.d/virtualbox start'

I get this error.
'[....] Starting virtualbox (via systemctl): virtualbox.serviceJob for virtualbox.service failed because the control process exited with error code. See "systemctl status virtualbox.service" and "journalctl -xe" for details.
failed!'

Can you help me with this one?

@s2925534

Copy link
Copy Markdown

I am getting the same error.

@BalalRaza

Copy link
Copy Markdown

I am getting the same error too.

virtualbox.service - LSB: VirtualBox Linux kernel module
Loaded: loaded (/etc/init.d/virtualbox; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2017-10-06 12:24:40 IST; 50s ago
Docs: man:systemd-sysv-generator(8)
Process: 752 ExecStart=/etc/init.d/virtualbox start (code=exited, status=1/FAILURE)

@jonngrey

Copy link
Copy Markdown

i got an error

sudo /etc/init.d/virtualbox start

  • Loading VirtualBox kernel modules...
  • No suitable modules for running kernel found
    [ fail ]

@firegaming1

Copy link
Copy Markdown

Oh no! F****

@mygarcia1

Copy link
Copy Markdown

Thank you it worked for me!

@Curtisho

Curtisho commented Feb 9, 2018

Copy link
Copy Markdown

Thank you for sharing

@redieu

redieu commented Apr 16, 2018

Copy link
Copy Markdown

This is the only tutorial that works for me. I've tried many other without success. Congratulations and thank you!

@danilosilvadev

Copy link
Copy Markdown

I get this error.
'[....] Starting virtualbox (via systemctl): virtualbox.serviceJob for virtualbox.service failed because the control process exited with error code. See "systemctl status virtualbox.service" and "journalctl -xe" for details.
failed!'

@zaineb882

Copy link
Copy Markdown

thank you for helping that works 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment