Live-Build is used to produce our Kali releases. We encourage people to get involved and create their customized Kali versions whenever they can. The document is one of our most-requested items on our . This topic also features in the Kali Dojo. It’s a favorite of our staff and our customers.
Live-build is hampered by the requirement that you have a Kali computer to create a Kali server. This is because you need to make small modifications in the live-build and original debootstrap packages for Kali ISO building. These changes are included in Kali. However, most require some light massaging to allow our ISOs build.
We have added instructions to using other Debian-based systems like Debian 9 (Stretch/), Ubuntu 16.04, and 18.04. Users running Debian derivatives will be able to try Kali out and experience one of its coolest features.
It isn’t as difficult as you might think. So, give it a try!
Kali Building on Non-Kali Debian Based Systems
Live-build can be easily performed on Debian-based systems that are not Kali. These instructions have been verified to work on Ubuntu and Debian.
We first prepare the system, making sure it’s up-to-date. Then, we download and install the Kali archive keyring, as well as the live build packages. The latest versions of these packages can always be found at and respectively.
sudo apt update sudo apt -y upgrade wget https://http.kali.org/pool/main/k/kali-archive-keyring/kali-archive-keyring_2018.1_all.deb wget https://archive.kali.org/kali/pool/main/l/live-build/live-build_20180618kali1_all.deb
Once that is done, you can install any additional dependencies or the files previously downloaded.
sudo apt -y install git live-build cdebootstrap debootstrap curl sudo dpkg -i kali-archive-keyring_2018.1_all.deb sudo dpkg -i live-build_20180618kali1_all.deb
Once the environment is ready, it’s time to start the live-build. We set up the script and check out the configuration.
cd /usr/share/debootstrap/scripts/ (echo "default_mirror http://http.kali.org/kali"; sed -e "s/debian-archive-keyring.gpg/kali-archive-keyring.gpg/g" sid) > kali sudo ln -s kali kali-rolling cd ~ git clone git://gitlab.com/kalilinux/build-scripts/live-build-config.git cd live-build-config/
To bypass the version checking, you will need to modify the code.sh script. This is done by commenting the “exit 1” below.
# Check we have a good debootstrap ver_debootstrap=$(dpkg-query -f '$Version' -W debootstrap) if dpkg --compare-versions "$ver_debootstrap" lt "1.0.97"; then if ! grep -q kali; then echo "ERROR: You need debootstrap >= 1.0.97 (or a Kali patched debootstrap). Current version: $ver_debootstrap >&2 exit 1. fi
After that, you should see the following:
# Check we have a good debootstrap ver_debootstrap=$(dpkg-query -f '$Version' -W debootstrap) if dpkg --compare-versions "$ver_debootstrap" lt "1.0.97"; then if ! grep -q kali; then echo "ERROR: You need debootstrap >= 1.0.97 (or a Kali patched debootstrap). Current version: $ver_debootstrap >&2 # exit 1. fi
Now we can build our ISO like normal
sudo ./build.sh --variant light --verbose
There is no obligation to test
You might be interested in quickly testing the ISO that you have created after Kali is built. QEMU allows you to run a quick, no-obligation trial. Ubuntu is easy to set up.
sudo apat -y libvirt-bin Ubuntu-VM-Builder Bridge-utils Sudo Adduser $(id-un) KVM newgrp
Once that is done, you will be able to create a dynamic disk file for Kali and boot from your newly-created ISO. You don’t need to worry about how big the disk is. It will expand as you require so that your disk doesn’t fill up suddenly.
qemu-img create -f qcow2 kali-disk.img 100G kvm --name Kali -m 1024 -hda kali-disk.img -cdrom kali-linux-light-rolling-amd64.iso -boot d
You can now run Kali live or copy it to the virtual drive. We can then launch our newly created VM by using the command.
KVM --name Kali 1024 –hda Kali-disk.img Boot c
Few things are more satisfying than running your Linux installation that you have created and modified for the purpose you want. Why wait when you can build Kali from other Debian-based distributions, and have it tested quickly?