How to Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux


Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux




 

UPDATE: 13/03/2014 – Readers should follow these new guides that works flawlessly with Kali 1.0.6. Use this guide as a fallback.




  1. Install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver




  2. Install NVIDIA driver kernel Module CUDA and Pyrit on Kali Linux – CUDA, Pyrit and Cpyrit-cuda




 

This will guide you through the process on installing Nvidia Cuda and Pyrit in Kali Linux.

Disclaimer: Readers please note that this worked for me without any issues. Depending on your card and how much changes you’ve already made, it might or might not work for you. It seems every installation is slightly different, and depending on you system, you might encounter some issue. I would urge readers to try and follow Official Documentation and Kali Forums first. If all fails, then you can try this method. I got some good feedback on this method when other methods failed, then again I got readers who didn’t manage to make it work.I guess it varies, but you should have some basic knowledge of Linux before you jump in and do something. (isn’t that a given?). I write this blog based on the fact that I’ve encountered similar issues and managed to solve my problem in the following way, your way might be different all-together and I can not always help. Feedback is most welcome, let me know how your installation went via a comment (Anyone can comment, no registration required). If you have a better solution or have a different way of doing things, let me know also. Again, I am happy that you’re in my site and I am able to help some, but for few others, maybe following Official Documentation or asking inKali Forums might an option.

 

Download Pyrit and Cpyrit:


NVIDIA CUDA

Nvidia Cuda Toolkit https://developer.nvidia.com/cuda-toolkit
I used the Version 5.5 Self Extracting Installer for 64-Bit OS.

pyrit http://pyrit.googlecode.com
cpyrit http://pyrit.googlecode.com

Install Linux Kernel Headers:


apt-get upate && apt-get install -y linux-headers-$(uname -r)

Disable the built-in Linux drivers, save the changes to grub and reboot to unload them


sed 's/quiet/quiet nouveau.modeset=0/g' -i /etc/default/grub
update-grub
reboot

Once the computer reboots. DO NOT log back into the GDM. Instead press CTRL + ALT + F1 and log into the command prompt.

In order to install the Nvidia drivers, you need to shut down the gdm service by typing this
service gdm3 stop

Now we are ready to install the nVidia driver and Cuda Toolset.

Installing Nvidia driver and Cuda Toolset:


CD to the directory that you downloaded the Nvidia drivers to and type the following commands. (this is for the version that I downloaded. If you have a different version, put the correct file name in for yours)
chmod 755 cuda-5.5.11-linux_64.run
./cuda-5.5.11-linux_64.run

At this point scroll through the EULA (space to move a page at a time, enter for a line at a time) and Accept the agreement.

You might get a warning that this is not a supported version of Linux, do you want to continue. Type Y and press enter.

I took the defaults for the rest of the options.

Hopefully at this point you should (after a couple minutes) get a message saying that the install was successful. Now reboot.
reboot

Once your computer comes back up, you will probably see a blank black screen with a cursor flashing in the top left corner. Don’t worry, it’s not a bad thing, and nothing is gone. Just follow the guide.

Fixing black screen with a cursor problem:


Simply press CTRL + ALT + F1 and login.

Type the following
nvidia-xconfig
reboot

You should now be able to log in using the gdm GUI.

The hard part is done!

A few more minutes and you will be up and running with pyrit using your GPU’s.!

Installing Pyrit


Open a terminal shell and cd to the directory that you downloaded the pyrit files to.

Type the following to extract them. Remember to change the file name if you have a different version.
tar -xvzf pyrit-0.4.0.tar.gz
tar -xvzf cpyrit-cuda-0.4.0.tar.gz

For the sake of brevity I will just type all of the next steps into a single code box. But just understand that I am adding a couple packages that are necessary to compile / run. Then installing pyrit and cpyrit. These are the commands I used, and the files were in my /root/ directory.
apt-get install python2.7-dev python2.7-libpcap libpcap-dev

cd /pyrit-0.4.0/
python setup.py build
python setup.py install

cd

cd /cpyrit-cuda-0.4.0/
python setup.py build
python setup.py install

pyrit list_cores

If all went well, you should have a list of available processors, including your GPU(s)!!

Black Screen Troubleshooting


If you see a blank screen after correctly installing cuda toolkit 5.5 do  CTRL + ALT + F1 and login.. Then:
rm /etc/X11/xorg.conf
vi ~/.bashrc

Change the PATH= and add these lines to the end (after the last fi) so it looks like this:
PATH=$PATH:/usr/local/cuda-5.5/bin
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-5.5/lib
export PATH
export LD_LIBRARY_PATH

Exit your file editor and save changes.
source /root/.bashrc
ldconfig
reboot

See more here in the Kali Official forum.

End of guide How to Install Nvidia Kernel Module Cuda and Pyrit in Kali Linux. Thanks for reading. Please share.

HOW TO INSTALL NVIDIA KERNEL MODULE CUDA AND PYRIT IN KALI LINUX - blackMORE Ops

 

No comments:

Post a Comment