HOWTO : VirtualBox 4.2.10 on Pentoo 2013.0 RC1.1

The current version (at the time of this writing) of VirtualBox is 4.2.10. However, it is masked in the main stream of Gentoo so as Pentoo. The reason of mask is unstable. It is recommended to use 4.1.24 from the Gentoo.



To install the current version of VirtualBox, you need to unmask it. I am a new comer of Gentoo/Pentoo, so my tutorial may not be 100% right.



Step 1 :



sudo eix virtualbox



sudo nano /etc/portage/package.accept_keywords



Append the following lines :



=app-emulation/virtualbox-bin-4.2.10 ~amd64

=app-emulation/virtualbox-modules-4.2.10 ~amd64

=app-emulation/virtualbox-guest-additions-4.2.10 ~amd64

=app-emulation/virtualbox-extpack-oracle-4.2.10 ~amd64

=app-emulation/virtualbox-additions-4.2.10 ~amd64

=app-emulation/virtualbox-4.2.10 ~amd64




sudo eix-update

sudo eix virtualbox




You will then see the current version on the screen.



sudo nano /etc/portage/make.conf



Append "PUEL" at the end of the ACCEPT_LICENSE :



ACCEPT_LICENSE="AdobeFlash-11.x Intel-SDP PUEL"



Step 2 (Install from the binary) :



** This step is tested **



Then check if the installation of VirtualBox will be working or not. I am going to install the "virtualbox-bin", the binary file, instead of compiling from source :



sudo emerge -pa virtualbox-bin



If everything is alright, you can install it :



sudo emerge -av virtualbox-bin



Step 3 :



After the installation, you need to add yourself (samiux here) to the group of "vboxusers" on the host (Pentoo) :



sudo gpasswd -a samiux vboxusers

sudo gpasswd -a vboxusers samiux




Step 4 :



Since the necessary modules of VirtualBox do not load properly, you need the following script to load and unload it when necessary.







Download it and save it at /etc/init.d/virtualbox :



sudo chmod +x /etc/init.d/virtualbox



To start it :



sudo /etc/init.d/virtualbox start



To stop it :

sudo /etc/init.d/virtualbox stop



To start it automatically when boot :



sudo rc-update add virtualbox default



Update :



According to one of the developers, you have another way to load the modules automatically :



echo modules="vboxdrv vboxnetflt vboxnetadp" >> /etc/conf.d/modules



Step 5 (General Linux) :



Install Linux guest (when necessary). After the installation, you need to add yourself (samiux here) to the group of "vboxsf" on the guest (Linux) :



sudo gpasswd -a samiux vboxsf



*** make sure it is vboxsf BUT NOT vboxfs.



Then, the share folder feature will be working properly.



Step 6 (Pentoo) :



Install the same version of virtualbox-guest-additions in your guest (Pentoo / Gentoo) as above mentioned method.



At the guest (Pentoo), you should do the following as the required module does not load properly and the mount does not work automatically.



sudo nano /etc/local.d/00-vboxsf.start



modprobe vboxsf

mount -t vboxsf vbox_share /media/sf_vbox_share




sudo chmod +x /etc/local.d/00-vboxsf.start



sudo gpasswd -a samiux vboxsf



Reboot your guest.



That's all! See you.