Has anyone figured out a definitive, persistent (as in works across reboots) workaround to get USB devices to work properly in guests under an Ubuntu host?
If so, please post. And if this works, moderators please sticky that post, others will save a great deal of time fixing it. I'm tired of reading/trying all these fixes that don't work consistently. Hopefully Sun will include some sort of fix in the next update of virtual box so it just works.
Ubuntu 8.04 + USB + VB 1.6
-
Sasquatch
- Volunteer
- Posts: 17798
- Joined: 17. Mar 2008, 13:41
- Primary OS: Debian other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Windows 7, Linux
- Location: /dev/random
This 'howto' is taken from neco, posted in USB not working in ubuntu hardy and slightly modified to my setup. I like this idea more, the use of a separate group for USB. This setup is for Ubuntu. It might work on other distributions. Also, as Ubuntu changes the location/names of files between releases, this might not work for versions prior and after 8.04, on which I tested this. If my memory serves me right, this can be used on 7.10 Gutsy without any problems too. The files should have the same name and location.
Look for:
uncomment and let as this:
To start the service do:
Create a new group and add yourself to it*:
From here two options:
Option 1
Edit rules:
Look for:
Now add:
GROUP="usbfs"
to that (your VirtualBox user must be member of that group):
If still no luck , also try Option 2.
Option 2
Add to the botton of the file, where devgid is your vboxusers group id:
To mount it:
This howto is taken from neco, posted in USB not working in ubuntu hardy and slightly modified to my setup. I like this idea more, the use of a separate group for USB. This works as it says, after reboot of either Host or Guest, you can use USB devices without any hassle.
* You are free to change the group number. I picked it, because I like users to have IDs above 1000 and groups under 1000. Just make sure that it does not overlap with anything listed in /etc/group and /etc/passwd.
Note:
I followed both options. I am not certain if Option 1 is needed. I would suggest to run Option 2 first, you can always change the rules if needed.
Code: Select all
$ sudo gedit /etc/init.d/mountdevsubfs.sh
Code: Select all
#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount –rbind /dev/bus/usb /proc/bus/usb
Code: Select all
#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb
Code: Select all
sudo /etc/init.d/mountdevsubfs.sh startCode: Select all
addgroup --gid 505 usbfs
usermod -a -G usbfsOption 1
Edit rules:
Code: Select all
$ sudo gedit /etc/udev/rules.d/40-permissions.rulesCode: Select all
LABEL=”usb_serial_start”
ATTRS{idVendor}==”0403?, ATTRS{idProduct}==”6001?, \
, MODE=”0660?, GROUP=”dialout”
LABEL=”usb_serial_end”GROUP="usbfs"
to that (your VirtualBox user must be member of that group):
Code: Select all
LABEL="usb_serial_start"
ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", \
,GROUP="usbfs", MODE="0660", GROUP="dialout"
LABEL="usb_serial_end"Option 2
Code: Select all
sudo gedit /etc/fstabCode: Select all
none /proc/bus/usb usbfs [u]devgid=505[/u],devmode=664 0 0Code: Select all
sudo mount -a* You are free to change the group number. I picked it, because I like users to have IDs above 1000 and groups under 1000. Just make sure that it does not overlap with anything listed in /etc/group and /etc/passwd.
Note:
I followed both options. I am not certain if Option 1 is needed. I would suggest to run Option 2 first, you can always change the rules if needed.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org
Retired from this Forum since OSSO introduction.