Jump to content











Photo
- - - - -

USB on VirtualBox Personal 1.6 and Ubuntu 8.04


  • Please log in to reply
3 replies to this topic

#1 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 09 July 2008 - 05:28 PM

I've came across with the need to allow virtual box inside an ubuntu box to access the USB devices while running an emulated XP machine.

Found a few resources on the web but was needed to hop from one page to another until I finally learned how to get it done, I'm posting here the required steps by order so that others can also achieve the same result.

A lot of friends at my workplace began installing Ubuntu on their machines and been asking me quite a few times to get this feature working.

Was tested on several machines with Intel x86 and AMD x64 versions of both Ubuntu 8.04 and VirtualBox 1.6.x

----


Step 1
Type on a console:
sudo gedit /etc/init.d/mountdevsubfs.sh

Next you move around to line 45 and remove the #'s from the missing USB support.

It should look like this once it's ready:
#

# 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

}

Step 2
Type in console:
sudo gedit /etc/udev/rules.d/40-basic-permissions.rules

Change the lines :

From:

# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"

To :

# USB devices (usbfs replacement)
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usbusers", MODE="0664"
SUBSYSTEM=="usb_device", MODE="0664"



Step 3

You need to know which group number is used for "vboxusers"
Here are the steps:
- Click --> System --> Admisnitration --> Users & Groups
- Click on "Unlock"
- Click on "Manage Groups"
- Scroll down until you see the "vboxusers" group and see the respective number.

Type in console:
sudo gedit /etc/fstab

add this line on the bottom of the file:
none /proc/bus/usb usbfs devgid=120,devmode=664 0 0

Change 120 in the above line with the "vboxusers" group number you got on the beginning of this step.


Step 4

Reboot the computer.

Open VirtualBox and click on "Settings".

Click on the "USB" item in the left pane to edit the USB preferences

Click on the "Add device" button to add a filter and select your USB device

Start your VM and Windows should detect your USB devices.


--------

Was also blogged here: http://nunobrito1981...nal-16-and.html

:)

#2 Mikorist

Mikorist

    ▂ ▃ █ ▅ ▆

  • Advanced user
  • 771 posts
  •  
    United Nations

Posted 10 July 2008 - 07:17 PM

A good article, Nuno !

:)

Mikorist

#3 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 10 July 2008 - 08:51 PM

VirtualBox is really important to mix the best of both worlds together.

Ubuntu is making a silent revolution on the place where I work. Many people prefer to use Ubuntu on their assigned client machines rather than being helpless victims of viruses and enjoy a much faster machine with a clean kernel (and no antivirus running in the background to hog memory).

Glad you liked this short tutorial Mikorist and happy birthday! (forgot mentioning it three days ago)

:)

#4 Mikorist

Mikorist

    ▂ ▃ █ ▅ ▆

  • Advanced user
  • 771 posts
  •  
    United Nations

Posted 12 July 2008 - 12:20 AM

Thanks :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users