Title | Instaling CUDA on Backtrack |
Permission | rw-r--r-- |
Author | Unknown |
Date and Time | 21:54 |
Category | backtrack| install |
Share |
First you must prepare Backtrack kernel source for NVIDIA driver installation
prepare-kernel-sources
Then change your directory to /usr/src/linux and copy all file on include/generated/ to include/linux/
cd /usr/src/linux
cp -rf include/generated/* include/linux/
Now download NVIDIA drivers. The drivers according to your CPU architecture.
32 bit: http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_32_270.40.run
64 bit: http://developer.download.nvidia.com/compute/cuda/4_0_rc2/drivers/devdriver_4.0_linux_64_270.40.run
Run the Nvidia driver installer, but you must log out from X session first. Then, download the CUDA toolkit. The toolkit according to your CPU architecture.
32 bit
http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_32_ubuntu10.10.run
64 bit
http://www.nvidia.com/object/thankyou.html?url=/compute/cuda/4_0_rc2/toolkit/cudatoolkit_4.0.13_linux_64_ubuntu10.10.run
You need to configure the Backtrack environment variables and ideally CUDA was installed in /opt. This is for nvcc command, because if you don't configure the environment variables the nvcc command won't work. You can do this by add this lines in your /root/.bashrc file.
PATH=$PATH:/opt/cuda/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/cuda/lib
export PATH
export LD_LIBRARY_PATH
Then run this command
source /root/.bashrc
ldconfig
Now check that nvcc compiler was installed with run this two command
which nvcc
nvcc -V
After Nvidia driver and CUDA toolkit are completely installed, we can test with pyrit, a GPU powered tool.
svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit
cd pyrit/pyrit && python setup.py build && python setup.py install
cd ../../
cd pyrit/cpyrit_cuda && python setup.py build && python setup.py install
Then run a benchmark
pyrit benchmark
Ok that's all. the CUDA installation was completed. Next time I'll post about install CUDA Ubuntu. Installing CUDA on Ubuntu will be easy like this :-)