Cannot change owner vboxusers for device /dev/vboxdrv

Bug #153819 reported by Gavin Chappell
44
Affects Status Importance Assigned to Milestone
virtualbox-ose-modules (Ubuntu)
Fix Released
Undecided
Daniel Hahler
Declined for Gutsy by Henrik Nilsen Omma

Bug Description

Binary package hint: virtualbox-ose

Setting up virtualbox-ose-modules-2.6.22-14-generic (6) ...
 * Starting VirtualBox kernel module vboxdrv chown: `:vboxusers': invalid group

 * Cannot change owner vboxusers for device /dev/vboxdrv.

Following a "sudo aptitude install virtualbox".

From the command prompt afterwards, the "vboxusers" group does exist, GID 119, however /dev/vboxdrv doesn't exist so I can't change the ownership manually.

This is using gutsy, freshly dist-upgraded as of this morning.

Revision history for this message
Daniel Hahler (blueyed) wrote :

The init script wants to make sure that the device is owned by the correct group, but unfortunately the group does not get created by the postinst scripts.

You say that the "vboxusers" group does exist already, but I don't think that's the case. It would not say "invalid group" in this case probably.
What does "grep vboxusers /etc/group" display?

You can probably work around this, by creating the group manually:
# Create group:
sudo groupadd vboxusers
# Add user:
sudo usermod -a -G vboxusers [yourlogin]
# Then restart the module:
sudo invoke-rc.d vboxdrv start

Changed in virtualbox-ose-modules:
assignee: nobody → blueyed
status: New → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

vboxusers should have been created by virtualbox-ose

Changed in virtualbox-ose-modules:
status: In Progress → Incomplete
Revision history for this message
Gavin Chappell (g-a-c) wrote :

Unfortunately this is a machine in my office which I've now left for the weekend. When I ran "grep vboxusers /etc/group" after getting back to the command line, it told me the group existed with GID 119, but had no members. I worked out that the reason /dev/vboxdrv didn't exist is due to the module load failing (which was caused by the lack of group at the time).

I think the fix involved just running "sudo /etc/init.d/vboxdrv restart" when I was returned to the command line, and since the vboxusers group exists on this second run, the startup was successful. Then I manually added my account to the vboxusers group and I was able to run Virtualbox successfully as a non-root user.

I will check my .bash_history on Monday when I'm back in the office to see if those instructions are correct.

Revision history for this message
Daniel Hahler (blueyed) wrote :

The problem is that virtualbox-ose-modules-* does not depend on virtualbox-ose, which makes sure the user exists. And if you install both packages together, the user is not created yet, when the modules package expects it to be.

The problem can be reproduced as follows:
$ sudo groupdel vboxusers
$ sudo apt-get remove --purge virtualbox-ose virtualbox-ose-modules-2.6.22-14-generic
$ sudo apt-get install virtualbox-ose virtualbox-ose-modules-2.6.22-14-generic
[,,,]
The following NEW packages will be installed:
  virtualbox-ose virtualbox-ose-modules-2.6.22-14-generic
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
[,,,]
Selecting previously deselected package virtualbox-ose-modules-2.6.22-14-generic.
(Reading database ... 306811 files and directories currently installed.)
Unpacking virtualbox-ose-modules-2.6.22-14-generic (from .../virtualbox-ose-modules-2.6.22-14-generic_6_i386.deb) ...
Selecting previously deselected package virtualbox-ose.
Unpacking virtualbox-ose (from .../virtualbox-ose_1.5.0-dfsg2-1ubuntu3_i386.deb) ...
Setting up virtualbox-ose-modules-2.6.22-14-generic (6) ...
 * Starting VirtualBox kernel module vboxdrv chown: `:vboxusers': invalid group

 * Cannot change owner vboxusers for device /dev/vboxdrv.

Setting up virtualbox-ose (1.5.0-dfsg2-1ubuntu3) ...

Changed in virtualbox-ose-modules:
assignee: blueyed → nobody
status: Incomplete → Confirmed
Revision history for this message
Daniel Hahler (blueyed) wrote :

I've experimented with using Depends and Pre-Depends, but could not make it work, so that virtualbox-ose would get configured before virtualbox-ose-modules-...

Therefor I think the right fix appears to just not chowning /dev/vboxdrv, when the group vboxusers does not exist yet.

Revision history for this message
Daniel Hahler (blueyed) wrote :
Revision history for this message
Gavin Chappell (g-a-c) wrote :

Yep, just checked my bash_history, and it looks like the steps to fix it are just to manually run a "sudo /etc/init.d/vboxdrv start" afterwards (to create the /dev/vboxdrv device with the right permissions now that the group exists), and then add accounts to the vboxusers group manually.

Since I assume that the /dev/vboxdrv entry is only needed by the kernel module, could the module package itself create the vboxusers group, rather than vbox-ose? Please note I'm not a package maintainer so I've done zero work into pulling the existing .debs apart to see what happens...

Revision history for this message
Daniel Hahler (blueyed) wrote :

Steve, can you please take a look at this one?

Changed in virtualbox-ose-modules:
assignee: nobody → stevenk
Revision history for this message
Moritz Naumann (mnaumann) wrote :

This is apparently a duplicate of Bug #154630

Daniel Hahler (blueyed)
Changed in virtualbox-ose-modules:
assignee: stevenk → blueyed
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package virtualbox-ose-modules - 8

---------------
virtualbox-ose-modules (8) hardy; urgency=low

  * debian/control: Build also virtualbox-ose-modules-*-{386,rt,virtual}
    (LP: #156740)
  * debian/init:
    - Merged from virtualbox-ose SVN
    - Re-add stop action and use it in restart (LP: #164437)
    - Removed "set -e", so that "killall -q VBoxSVC" cannot cause
      failure of the script (LP: #153359)
    - Only chown vboxdrv device, if vboxusers group exists (LP: #153819)
  * debian/control: Recommend virtualbox-ose
  * debian/control: Standards Version 3.7.3
  * debian/rules: do not use "-k" option for dh_clean
  * debian/control: changed Maintainer to Ubuntu MOTU Developers

 -- Daniel Hahler <email address hidden> Tue, 29 Jan 2008 20:17:03 +0100

Changed in virtualbox-ose-modules:
status: In Progress → Fix Released
Revision history for this message
Juan (www-juan) wrote :

Hi everyone, I could fix the same problem creating a new Group in:

System > Administration > Users and Groups > Manage GRoups

After you create the new group you have to add an user in this group (your login name).

Logout. them login and that's all.

Bye!
___________
Juancho.

Revision history for this message
togreglove (togreglove) wrote :

I had installed virtualbox-ose to see if I liked it (I did), but decided that I wanted the full version, so I installed Sun xVM VirtualBox and loved it even more. Having the better version, I removed the Virtualbox-OSE, which deleted the vboxusers group, which caused these symptoms on my system. I manually recreated the group, added myself and root to the group and did a /etc/init.d/vboxdrv setup and it fixed everything right up. Hope this helps someone.

Revision history for this message
Dominik Wujastyk (wujastyk) wrote :

#1 from Daniel Hahler above worked for me:

> You can probably work around this, by creating the group manually:
> # Create group:
> sudo groupadd vboxusers
> # Add user:
> sudo usermod -a -G vboxusers [yourlogin]
> # Then restart the module:
> sudo invoke-rc.d vboxdrv start

Many thanks!

Dominik

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.