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.
-
Install proprietary NVIDIA driver on Kali Linux – NVIDIA Accelerated Linux Graphics Driver
-
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 in Kali Forums might an option.
Download Pyrit and Cpyrit:
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.
would this same process work in backbox linux?
Hi Chris,
Thanks for posting.
I can't say for sure as I haven't tested much with BackBox Linux yet. There's one post in BackBox forum (http://forum.backbox.org/hardware-support/amd-cat…) which got contradictory comments but personally I don't like using PPA, you never know what piece of code you're getting.
You might want to try http://wiki.cchtml.com/. They got best info available.
I have tried your guide but I was not able to install nvidia driver include in toolkit.
can you help me?
here is the installer log (nvidia.ko module failed to install) http://pastebin.com/M6NSD2RK
Is a freh installed 64-bit system. Do I need additional packages except the kernel-headers?
Any help would be appreciated!
thanks in advance
Is it because v3.12 kernel is not yet supported by NVIDIA? I'll have to test it myself before I can help. Try posting in forums.Kali.org, someone might have a solution already.
I got it working –
1) installed nvidia driver 319.82 from nvidia's website
reboot
2) Ctrl + ALT + F1
3) service gdm3 stop
4) ./cuda_5.5.22_linux_64.run -silent -driver
6) reboot
5) installed cpyrit and pyrit
Thanks for letting us know. Everyone with latest kernel will find it really useful.
Hi,
I am facing same problem as you had. After watching your comment i tried to install nvidia driver with NVIDIA-Linux-x86_64-331.38.run file i downloaded from nvidia site. But when i install it i am getting this error
"unable to build unified memory kernel module" What should i do?
If there is something please let me know, i already spent 3 days to get this thing working.
Hi there!
Need some help to pass the “nouveau.modeset=0” parameter on particular kali install (working on a multi-boot install (deb, arch,buntu;win8) with grub loader)
Cant figure out how to set nouveau.modeset=0 ONLY for kali boot…
Modify grub.cfg directly and add parameters to kali. Don’t add it for recovery though. Bit non standard but working solution. For every grub update you have to redo it. (as you want it for Kali Linux only, modifying grub.cfg is the safest option. )
Is a custom build that is geared towards computers with Nvidia hardware possible? There are already some custom Kali Linux builds that are available, but you always have to build them from scratch. It would be nice to have a live CD that is already prepared to use Nvidia graphics cards for use with pyrit or cudaHashcat. In other words, the Nvidia drivers would come preloaded on that live Kali image.
Theoretically, after you have installed the drivers on a system, you could go through the usual steps to build a live ISO image as documented here: http://docs.kali.org/downloading/live-build-a-custom-kali-iso
Hi Michael,
Correct. Each ISO will be system specific and may or may not work for the next person. Let me know if you’ve managed to do it, it could be a great help for the community.
-BMO