Cuda on Backtrack 5 R2

After some pyrit problem this is guide to install cuda on Backtrack 5 R2. This guide is to configure cuda drivers and running parallel processing.

Start by preparing your kernel sources for the Nvidia driver installation:

root@bt:~# prepare-kernel-sources
root@bt:~# cd /usr/src/linux
root@bt:~# cp -rf include/generated/* include/linux/

Download Nvidia drivers according to your CPU architecture

Make sure you are not in an X session (log out to console), and run the Nvidia driver installer.

Next, download the CUDA toolkit, according to your CPU architecture:  (32 bit)  (64 bit)

During CUDA toolkit installation give install path folder to /opt.Now Configure your environment variables so that the nvcc command works. You can do this by appending the following lines in your /root/.bashrc file:

export PATH

Then run:

root@bt:~# source /root/.bashrc
root@bt:~# ldconfig

Now check if everything is setup correctly

root@bt:~# which nvcc
root@bt:~# nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2011 NVIDIA Corporation
Built on Thu_Jan_12_14:36:13_PST_2012
Cuda compilation tools, release 4.1, V0.2.1221

Now Nvidia driver and CUDA toolkit is install lets check it by pyrit.

Following command will create main directory tree for installation with svn support.

svn checkout pyrit

We have just created a dir /pyrit_svn.This will install libs and other stuff that are needed:

apt-get install libssl-dev
apt-get install scapy
apt-get install python-dev

Going to construct pyrit

cd pyrit/pyrit
python build
python install
root@bt:~# cd ../../
root@bt:~# cd pyrit/cpyrit_cuda && python build && python install

Run a benchmark to see that everything works as expected:

root@bt:~# pyrit benchmark
Pyrit 0.4.1-dev (svn r308) (C) 2008-2011 Lukas Lueg
This code is distributed under the GNU General Public License v3+

Running benchmark (63787.8 PMKs/s)... \ 

Computed 63787.82 PMKs/s total.
#1: 'CUDA-Device #1 'GeForce GTX 295: 11558.7 PMKs/s (RTT 3.0)
#2: 'CUDA-Device #2 'GeForce GTX 295: 10912.5 PMKs/s (RTT 2.9)
#3: 'CUDA-Device #3 'GeForce GTX 295: 10632.1 PMKs/s (RTT 3.0)
#4: 'CUDA-Device #4 'GeForce GTX 295: 11654.7 PMKs/s (RTT 2.9)
#5: 'CUDA-Device #5 'GeForce GTX 295: 10868.9 PMKs/s (RTT 2.9)
#6: 'CUDA-Device #6 'GeForce GTX 295: 10322.8 PMKs/s (RTT 3.0)
#7: 'CPU-Core (SSE2)': 500.7 PMKs/s (RTT 2.7)
#8: 'CPU-Core (SSE2)': 508.9 PMKs/s (RTT 2.8)

Tada!! Cuda GPU is enabled.

To remove pyrit remove following directories and files


I ran the locate command to find these... ~#locate pyrit

In Case you see some core missing it is due to because one core is reserved.So Dont worry if one core is missing during
That's all..see ya!!!

5 thoughts on “Cuda on Backtrack 5 R2

Add yours

  1. a query, I installed everything correctly,
    when running list_cores: shows me this.
    all right, let me know as I do that
    “‘CUDA-Device # 1’ GeForce 410 ” ‘show me
    the other 3 cores?

    #1: ‘CUDA-Device #1 ‘GeForce 410”
    #2: ‘CPU-Core (SSE2)’
    #3: ‘CPU-Core (SSE2)’
    #4: ‘CPU-Core (SSE2)’

Join the Discussion

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

Up ↑

%d bloggers like this: