Compile Kernel On Debian
Compile Kernel On Debian
Step-by-Step Breakdown
1. Install Required Packages:
sudo apt update
sudo apt install build-essential libncurses-dev bison flex libssl-dev libelf-dev
2. Download Kernel Source:
cd /usr/src
sudo wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.x.y.tar.xz
sudo tar -xf linux-6.x.y.tar.xz
cd linux-6.x.y
3. Configure Kernel:
sudo cp /boot/grub/config-(uname − r). /. conf igsudomakemenuconf ig − j(nproc)
4. Compile the Kernel and Modules:
sudo make -j$(nproc)
sudo make modules_install
sudo make install
5. Update GRUB
sudo update-grub
6. Reboot:
sudo systemctl reboot
This process will compile and install the Linux kernel on your Debian system. Make sure to
replace the kernel version in the download URL with the specific version you are compiling.
Additionally, ensure that you review and adjust the kernel configuration according to your
needs before compiling.