Live build a Custom Kali ISO

Building a customized Kali ISO is easy, fun, and rewarding. You can configure virtually any aspect of your Kali ISO build using the Debian live-build scripts.

These scripts allow developers to easily build live system images by providing a framework that uses a configuration set to automate and customize all aspects of building the image.

The Kali Linux development team has adopted these scripts and they’re used to produce the official Kali ISO releases.

Where Should You Build Your ISO?

Ideally, you should build your custom Kali ISO from within a pre-existing Kali environment.

Getting Ready — Setting up the live-build system

We first need to prepare the Kali ISO build environment by installing and setting up live-build and its requirements with the following commands:

apt install curl git live-build cdebootstrap

git clone git://git.kali.org/live-build-config.git

Now you can simply build an updated Kali ISO by entering the “live-build-config” directory and running our build.sh wrapper script, as follows:

cd live-build-config

./build.sh –distribution kali-rolling –verbose

The “build.sh” script will take a while to complete, as it downloads all of the required packages needed to create your ISO. Good time for a coffee.

Configuring the Kali ISO Build (Optional)

If you want to customize your Kali Linux ISO, this section will explain some of the details.Through the kali-config directory, the Kali Linux live build supports a wide range of customization options, which are well-documented on the Debian live-build man page. However, for the impatient, here are some of the highlights.

Building Kali with Different Desktop Environments

Since Kali 2.0, we now support built in configurations for various desktop environments, including KDE, Gnome, E17, I3WM, LXDE, MATE and XFCE. To build any of these, you would use syntax similar to the following:

# These are the different Desktop Environment build options:

#./build.sh –distribution kali-rolling –variant {gnome,kde,xfce,mate,e17,lxde,i3wm} –verbose

# To build a KDE ISO:

./build.sh –distribution kali-rolling –variant kde –verbose

# To build a MATE ISO:

./build.sh –distribution kali-rolling –variant mate –verbose

#…and so on.

Controlling the Packages Included in Your Build

The list of packages included in your build will be present in the the respective kali-$variant directory.For example, if you’re building a default Gnome ISO, you would use the following package lists file – kali-config/variant-gnome/package-lists/kali.list.chroot.By default, this list includes the “kali-linux-full” metapackage, as well as some others.These can be commented out and replaced with a manual list of packages to include in the ISO for greater granularity.

Build Hooks, Binary, and Chroot

Live-build hooks allows us to hook scripts in various stages of the Kali ISO live build.

As an example, we recommend you check out the existing hooks in kali-config/common/hooks/.

Overlaying files in your build

You have the option to include additional files or scripts in your build by overlaying them on the existing filesystem, inside the includes.

{chroot,binary,installer} directories, respectively. For example, if we wanted to include our own custom script into the /root/ directory of the ISO (this would correspond to the “chroot” stage), then we would drop this script file in the kali-config/common/includes.chroot/ directory before building the ISO.

SHARE
Previous articleGo language tutorial
Next articleBuilding a Kali Linux ISO for Older i386 Architecture

Hello Friends i am founder of networkking4u…..In this Site my purpose is write to Networkking related All topic covered..as well as i write Cisco examination,Amazon Web services,Cloud computing,programmingang Realeted to new technology…i hope you understand my concept…
usama norat

LEAVE A REPLY

Please enter your comment!
Please enter your name here