HOWTO: Install VirtualBox
To install via Portage:
1. Edit /etc/make.conf
and add the following line:
2. Install VirtualBox
eselect kernel list eselect kernel set kernel.number.you.want.here emerge --sync && layman -S << when using eix, use eix-sync instead. emerge -av app-emulation/virtualbox-bin app-emulation/virtualbox-modules
If Portage wants to install a new kernel, but you want to stick with your current kernel, use:
emerge emerge -av --nodeps app-emulation/virtualbox-bin app-emulation/virtualbox-modules
1. Download the latest VirtualBox from 
su - chmod +x VirtualBox-1.6.2-Linux_amd64.run
2. Unistall OSE (if installed)
equo remove --deep --configfiles app-emulation/virtualbox-bin app-emulation/virtualbox-modules
3. Run the 1.6.2 Installer
Verifying archive integrity... All good. Uncompressing VirtualBox for Linux installation........ VirtualBox Version 1.6.2 (Sat May 31 04:05:23 CEST 2008) installation
If you are upgrading from VirtualBox 1.5 or older and if some of your virtual machines have saved states, then the saved state information will be lost after the upgrade and will have to be discarded. If you do not want this then you can cancel the upgrade now. Do you wish to continue? [yes or no] yes Removing previous installation of VirtualBox from /opt/VirtualBox Installing VirtualBox to /opt/VirtualBox-1.6.2 Building the VirtualBox kernel module Failed to build the kernel module. Please check the log file /var/log/vbox-install.log for more information. Failed to start networking on the guest. Please check the log file /var/log/vbox-install.log for more information.
VirtualBox has been installed successfully, but the kernel module could not be built. When you have fixed the problems preventing this, execute /etc/init.d/vboxdrv setup as administrator to build it.
You will find useful information about using VirtualBox in the user manual /opt/VirtualBox-1.6.2/UserManual.pdf and in the user FAQ http://www.virtualbox.org/wiki/User_FAQ We hope that you enjoy using VirtualBox.
5. The kernel module fails? Oh well!
6. Run the make
make && make install
7. Load the module
8. Load at module at start-up (reccomended but optional)
echo '"modules_2_6="vboxdrv vboxnetflt"' >> /etc/conf.d/modules
9. Enjoy your improved USB support :D
v00d00 13:30, 14 April 2009 (UTC)