Compile linux-* kernel packages

In Debian Like Systems it goes like this

Installing need packages

    apt-get install kernel-package libncurses5-dev fakInstalling need packageseroot wget bzip2 build-essential

Download and decompress the kernel from

    bzip2 -d linux-
    tar xvf linux-

Configure the source for compilation

    cd /usr/src/linux-2.6.22-3
    make clean && make mrproper
    cp /boot/config-`uname -r` ./.config
    make menuconfig

Load alternate file > .config > ESC > Save? Yes


    make-kpkg clean
    fakeroot make-kpkg –initrd –append-to-version=-custom kernel_image kernel_headers

Installing new linux-headers package

    cd /usr/src
    dpkg -i linux-headers-
    dpkg -i linux-image-

Reconfiguring using new kernel (before boot or install linux-image)

    export KERN_DIR=/usr/src/linux-headers-

Use the new kernel headers to configure you application, in my case Virtualbox

    /etc/init.d/vboxdrv setup

Updated: 2010/02/26


Chief Solution Architect (CSA) working at Daycohost.

Passionate about open source and cloud native solutions.


# Repos Pushed