Tuesday, April 30, 2013

HOWTO : Troubleshooting CUDA on Pentoo 2013.0 RC1.1

As Pentoo 2013.0 RC1.1 is using hardened kernel, some application may not working properly. You may need to inspect and change the pax settings of the application in order to make it to work properly.

Use paxctl to inspect and change the pax settings.

paxctl -h
paxctl -v [application name]


Since the current Pentoo 2013.0 RC1.1 (as updated to April 29, 2013), the CUDA do not work properly by default. You are required to do something on it. This bug may be fixed in the next update or RC version.

First of all, make sure the libraries of CUDA are loading properly by making sure the following lines are at the file /etc/env.d/99cuda :

cat /etc/env.d/99cuda

PATH=/opt/cuda/bin:/opt/cuda/libnvvp
ROOTPATH=/opt/cuda/bin
LD_LIBRARY_PATH=/opt/cuda/lib64:/opt/cuda/lib


Finally, make sure some of the applications are set to proper pax settings. For example, cudaHashcat-plus64.bin and Cryptohaze-Multiforcer which are running with CUDA but they are not setting with pax flags properly at the current version.

Make sure the pax settings should be shown as the following :



Known Issue

The current version/update as on April 29, 2013, the pyrit does not work properly with CUDA. Since pyrit is written in Python, the paxctl does not work at all. According to one of the developers, the pyrit will be removed from the distribution.

That's all! See you.

Wednesday, April 10, 2013

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.

Friday, April 05, 2013

HOWTO : Customize Pentoo 2013.0 RC1.1

Once you installed and updated Pentoo 2013.0 RC1.1, you may consider to install some packages on it. I selected some of them for the installation.

sudo emerge -av galculator
sudo emerge -av shutter
sudo emerge -av radiotray
sudo emerge -av preload
sudo emerge -av xfce4-weather-plugin
sudo emerge -av gtk-recordmydesktop
sudo emerge -av gnome-system-monitor
sudo emerge -av xfce4-kbdleds-plugin
sudo emerge -av xfce4-cpufreq-plugin
sudo emerge -av gnome-media


If you need LibreOffice, you need to install it but it will take a very long time to compile from source code :

sudo emerge -av libreoffice

*** If you have a very slow CPU or do not want to compile LibreOffice from source, you can install the binary package instead if it is available :

sudo emerge -av libreoffice-bin

Installation of Network Manager

If you do not like the Wicd and will use VPN or mobile network (such as 3G) :

sudo emerge -av networkmanager
sudo emerge -av networkmanager-pptp
sudo emerge -av networkmanager-openvpn
sudo emerge -av networkmanager-vpnc
sudo emerge -av nm-applet


Then make it boot by default :

rc-update add NetworkManager default

Now, set to load GNOME service on boot :

Menu -- Settings -- Session and Startup -- Advanced

Select "Launch GNOME services on startup"

*** Make sure you unselect the Wicd at "Application Autostart".

Then, reboot your box.

Installation of GPointing Device Settings

sudo emerge -av gpointing-device-settings

Menu -- Settings -- Session and Startup -- Application Autostart

Select "GNOME Settings Daemon"

If you have ThinkPad with TrackPoint, you may need to set the Firefox to use the middle button :

Firefox -- Edit -- Preferences -- Advanced -- General

Select "Use autoscrolling"

Then, all the hotkeys of ThinkPad should work.

Installation of 3G USB Modem

sudo emerge -av usb_modeswitch
sudo emerge -av modemmanager


Add user to the group of plugdev :

sudo gpasswd -a samiux plugdev

Then, reboot your box.

Bonus #1

To make your Pentoo more secure by append the following to /etc/fstab :

tmpfs /tmp tmpfs noexec,nosuid,nodev,mode=1777,size=512M 0 0

*** Make sure the size is large enough for Pentoo to compile packages when update/upgrade. Or, simply DO NOT set this settings.

Bonus #2

If you are using hard drive and want to make Pentoo more faster, you can edit the /etc/fstab as the following :

/dev/sda1 /boot ext2 noatime,nodiratime,defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 noatime,nodiratime,defaults 0 1


If you are using SSD, you can :

/dev/sda1 /boot ext2 noatime,nodiratime,defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 discard,noatime,nodiratime,defaults 0 1


It will look like the following :



That's all! See you.