Difference between revisions of "HOWTO: Install VirtualBox"

From Sabayon Wiki
Jump to: navigation, search
m (Aposteeltje moved page HOWTO: Install VirtualBox (Proprietary) to HOWTO: Install VirtualBox (Portage): outdated. Cutting the Entropy part, making it Portage only.)
Line 1: Line 1:
 
{{I18n| [[HOWTO:_Install_VirtualBox_(Proprietary)|en]] [[Ru:HOWTO:_Install_VirtualBox_(Proprietary)|ru]]}}
 
{{I18n| [[HOWTO:_Install_VirtualBox_(Proprietary)|en]] [[Ru:HOWTO:_Install_VirtualBox_(Proprietary)|ru]]}}
==Entropy==
 
Run these two commands in order to install via Entropy, the fastest, simplest and safest method.
 
{{Console|<pre class="clear">
 
equo update
 
equo install virtualbox-bin virtualbox-modules
 
depmod -a
 
modprobe vboxdrv
 
modprobe vboxnetadp
 
modprobe vboxnetflt
 
</pre>}}
 
to get virtualbox modules loaded automatically
 
{{Console|<pre class="clear">
 
nano /etc/conf.d/modules
 
</pre>}}
 
 
add to it:
 
{{File|/etc/conf.d/modules| <pre class="clear">
 
modules_2_6="vboxdrv"
 
module_vboxdrv_args=""
 
</pre>}}
 
 
 
==Portage==
 
==Portage==
 
To install via Portage:
 
To install via Portage:
Line 37: Line 16:
 
  eselect kernel list
 
  eselect kernel list
 
  eselect kernel set kernel.number.you.want.here
 
  eselect kernel set kernel.number.you.want.here
  emerge --sync && layman -S
+
  emerge --sync && layman -S << when using eix, use eix-sync instead.
  emerge -av app-emulation/virtualbox-ose app-emulation/virtualbox-modules
+
  emerge -av app-emulation/virtualbox-bin app-emulation/virtualbox-modules
 
</pre>}}
 
</pre>}}
 +
 +
If Portage wants to install a new kernel, but you want to stick with your current kernel, use:
 +
{{Console|<pre class="clear">
 +
emerge emerge -av --nodeps app-emulation/virtualbox-bin app-emulation/virtualbox-modules
 +
</pre>}}
 +
If you DO want the new kernel, you can install it first, using kernel-switcher:
 +
[[Entropy#Using_Kernel_Switcher]]
 +
For Genkernel users, follow this guide:
 +
[[HOWTO:_Upgrade_kernel_using_genkernel]]
 
==Manually==
 
==Manually==
 +
 
1. Download the latest VirtualBox from [http://www.virtualbox.org/wiki/Linux_Downloads]
 
1. Download the latest VirtualBox from [http://www.virtualbox.org/wiki/Linux_Downloads]
  

Revision as of 23:35, 24 November 2012

i18n: en ru

Portage

To install via Portage:

1. Edit /etc/make.conf

nano /etc/make.conf

and add the following line:

File: /etc/make.conf
ACCEPT_LICENSE="*"

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

If you DO want the new kernel, you can install it first, using kernel-switcher: Entropy#Using_Kernel_Switcher For Genkernel users, follow this guide: HOWTO:_Upgrade_kernel_using_genkernel

Manually

1. Download the latest VirtualBox from [1]

 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

 ./VirtualBox-1.6.2-Linux_amd64.run

4. Continue:

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!

 cd /opt/VirtualBox-1.6.2/src

6. Run the make

 make && make install

7. Load the module

 modprobe vboxdrv

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)