Kali Linux on a Raspberry Pi 2

First git clone the kali linux arm repo from https://github.com/offensive-security/kali-arm-build-scripts

Now modify, the architecture in the rpi.sh script to read “armhf” rather “armel” as the Raspberry Pi 2 has a different processor architecture


Create our kernel configuration by copying the one that is pastebin’d here

Save the file as “rpi-3.1.8.config” in the kernel config directory.

Modify  the rpi.sh script to use our new kernel configuration.


Now run the rpi.sh command, if all goes well, you should see something like below.


14/02/2015 Update

You will probably encounter a problem with ‘startx’ command freezing the ‘X’ environment with the build. If this is the case, then look at the kali linux forum post here.

The solution is essentially to copy the /lib/modules directory from the Raspbian image. I will look at modifying the build script to solve this in the near future.

15 responses to “Kali Linux on a Raspberry Pi 2

  1. Pingback: Rasperry Pi 2 Kali kurulum – GüvenlikBankası

  2. Pingback: Kali-1.1.10 on a Raspberry Pi-2 | Cyberkryption

  3. Pingback: 1 – Kali from Git clone and Booting in 19 steps |

    • I would do an ls -lah on file you produced. Mine as around 3.1GB in size if memory serves. If it is larger than that, then it probably a build problem of some sort. Also, i used dd to flash my file to sd card, it is important with dd to make sure you have the device names correct, mine was mmcblk0 (whole sd card) and not mmcblkop1 or mmcblk0p2 which refers to the SD card partitions. If you think it is a build problem, then set your terminal for infinite scrolling in the preferences, run your build and save the output to a text file and put it up somewhere it can be downloaded and I will check it against mine. I am building on a Kali Linux machine not Ubuntu.

  4. You said “copy the /lib/modules directory from the Raspbian image”

    But to where on the kali image. There is no folder named modules inside its lib. I still tried to put the modules folder in the kali lib. But it didnt do anything…

    Any thoughts?

    • You mount the root partition raspbian image at say /mnt/raspbian-boot this is normally /dev/mmcblk0p1. Next do the same for raspbian root partition at /mnt/raspbian. Mount kali image root and boot at /mnt/kali and /mnt/kali-boot as read write.

      Now you can delete the contents of /mnt/kali/lib/modules and mnt/kali-boot.

      Copy /mnt/raspbian-boot to /mnt/kali and /mnt/raspbian/lib/modules to /mnt/kali/lib/modules

      Unmount all partitions and you should be good.

      Let me know how you go.

      I hope to remove this issue and a wireless injection in the next week or so, so check back



      Sent from my phone


  5. I downloaded the image and with the help of dd I write it on my stick, but can you please tell me now, how I can mount this image now? Of course I already looked up in the internet, but I found nothing, (… perhaps I just use the wrong words in Google lol ^^)

Leave a Reply

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

WordPress.com Logo

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

Google photo

You are commenting using your Google 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 )

Connecting to %s