Howto: Install VirtualBox in Ubuntu Hardy Heron with USB Support in 5 easy Steps!
*update* New Verson of Virtualbox Just released! Click Here!
When I last checked Virtualbox did not update their repositories for Hardy Heron, its not a problem, their is a hardy package without a repository. I have created a howto last year on howto setup VirtualBox completely and to seamlessly integrate windows xp into your ubuntu desktop here
So lets install the brand new virtualbox package for Hardy Heron...
Lets Install the essential build utilities so the vbox kernel module builds.sudo apt-get install build-essential linux-headers-`uname -r`
Install i386 VirtualBox without repository:wget http://www.virtualbox.org/download/1.5.6/virtualbox_1.5.6-28266_Ubuntu_hardy_i386.deb ; sudo dpkg -i virtualbox_1.5.6-28266_Ubuntu_hardy_i386.deb
Install amd64 Virtualbox without repository:wget http://www.virtualbox.org/download/1.5.6/virtualbox_1.5.6-28266_Ubuntu_hardy_amd64.deb ; sudo dpkg -i virtualbox_1.5.6-28266_Ubuntu_hardy_amd64.deb
Check Here for updated Virtualbox Packages since the repository isnt added yet
Alternate install with Gutsy repository as some people have suggested works fine, just copy/paste these exact commands into the terminal:sudo sh -c 'echo "# VirtualBox repository for Ubuntu Gutsy
deb http://www.virtualbox.org/debian gutsy non-free" \
> /etc/apt/sources.list.d/gutsy-virtualbox.list'
wget http://www.virtualbox.org/debian/innotek.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install virtualbox
Now you Must add your self to the vboxusers group:sudo adduser $USER vboxusers
Adding user `ionstorm' to group `vboxusers' ...
Adding user ionstorm to group vboxusers
Done.
Setup VirtualBox USB Support:
USB is disabled by default, so you'll probably want to enable it. Otherwise you'll get an error when you go into the "Settings" of your virtual machine. To correct this, you'll need to edit the mountdevsubfs.sh file:sudo gedit /etc/init.d/mountdevsubfs.sh
You'll see a block of code that looks like this:#
# 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
Now uncomment the last 4 lines above to look like this:#
# 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
Ok now logoff, then log back in so the vbox driver see's you are logged in to the vboxusers group.
If the above doesnt work try rebooting, if that doesnt enable usb you can try this:
Grab the vboxusers group id:grep vbox /etc/group
vboxusers:x:124:ionstorm
Edit the fstab with the group id # in bold:sudo gedit /etc/fstab
Append this to the fstab then save/exit:## usbfs is the USB group in fstab file:
none /proc/bus/usb usbfs devgid=124,devmode=664 0 0
Now lets edit the mountkernfs.sh file with the gid in bold:sudo gedit /etc/init.d/mountkernfs.sh
Paste the 2 lines below above the line: "# Mount spufs, if Cell Broadband processor is detected"## Mount the usbfs for use with Virtual Box
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=124,devmode=664
You may not need to reboot, try doing:sudo /etc/init.d/mountkernfs.sh
If not, reboot, and virtualbox should detect your usb devices!
You can follow my directions here to learn how to integrate Windows XP into your desktop!
Checkout the Official VirtualBox User Manual Here
Comments (66)

Comments by IntenseDebate
Friend · 882 weeks ago
Try to add that line to sources.list, after that sudo-apt get install VirtualBox works!
deb http://www.virtualbox.org/debian gutsy non-free
1.6.0 will be avaible in the nearest future!
chance · 882 weeks ago
defcon 52p · 882 weeks ago
joe · 882 weeks ago
joe · 882 weeks ago
sudo gedit /etc/init.d/mountdevsubfs.sh
## Mount the usbfs for use with Virtual Box
domount usbfs usbdevfs /proc/bus/usb -onoexec,nosuid,nodev,devgid=124,devmode=664
ajie · 882 weeks ago
Patrick 0p · 882 weeks ago
PFS · 882 weeks ago
Mark · 882 weeks ago
rb · 882 weeks ago
sudo gedit /etc/init.d/mountdevsubfs.sh
Obviously, this should be :
sudo gedit /etc/init.d/mountkernfs.sh
floating · 881 weeks ago
David · 881 weeks ago
Nice to know there are multiple ways to do the install, though.
Nabeel Moidu · 881 weeks ago
LeslieL · 881 weeks ago
oarking · 881 weeks ago
Dominic Bartel · 880 weeks ago
Tom B. · 879 weeks ago
Anything else I could do?
otacilio · 879 weeks ago
zandokitan 0p · 878 weeks ago
please im new in linux
Ahmad Amr · 878 weeks ago
Mike Smith · 877 weeks ago
Any ideas?
Alfonso Baqueiro · 876 weeks ago
Goofy666 · 876 weeks ago
http://forums.virtualbox.org/viewtopic.php?t=7255...
Thanks in advance!
Flokass · 875 weeks ago
Pedestrian · 875 weeks ago
You may not need to reboot, try doing:
sudo /etc/init.d/mountkernfs.sh start <----
And you do not need to reboot -(It's LINUX , YOU DO NOT NEED TO SAY and DO 'REBOOT' like as in windows platform where from scratch 'software architect' from 2 year forgot insert a lot of things!