Compile a custom kernel "the Debian way"

Install build dependencies

To work with the linux debianized kernel, you need to have some development packages, install them with the following command

sudo apt build-dep linux

Download the kernel source code

You can get the source code of the parrot kernel from different places


run sudo apt update to refresh the sources list

launch sudo apt install linux-source to download the kernel source code in /usr/src


edit /etc/apt/sources.list.d/parrot.list and make sure that the deb-src directive is not commented (remove the # character if present)

run sudo apt update to refresh the sources list

launch apt source linux to download the source code of the linux kernel from our repository


make sure you have git installed with sudo apt install git

launch git clone to download the parrot kernel source in the current folder

Configure the source code

Open a terminal window and enter the kernel source, then run

make menuconfig

This command will open the kernel configuration editor where you can take a look at the modules available, select or unselect them, decide if to include them as hardcoded in the base image or as a dynamically loadable module, and you can chande the settings of most of them

Once it is done you can save the configuration and proceed with the next step

Compile the deb packages

Compile the kernel with the following commands

make clean
make deb-pkg

Install the new kernel packages

Once it's done, install the resulting packages with the following command

sudo dpkg -i ../linux-{image,headers}-*.deb