Tag Archives: kernel

Kernel compilation (Debian Jessie)

Kernel compilation (Debian Jessie)

http://www.tecmint.com/kernel-compilation-in-debian-linux/

You will need 8-10 GB of free disk space!


apt-get install fakeroot kernel-package
wget -c https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.20.tar.xz
tar -xvJf linux-3.14.20.tar.xz
cd linux-3.14.20
cp /boot/config-`uname -r` .config


apt-get install libncurses5-dev
make menuconfig
make-kpkg clean
export CONCURRENCY_LEVEL=3
fakeroot make-kpkg --append-to-version "-customkernel" --revision "1" --initrd kernel_image kernel_headers
cd ..
dpkg -i linux-image-3.14.20-customkernel_1_amd64.deb linux-headers-3.14.20-customkernel_1_amd64.deb

Install Kernel 3.12 stable release on 64 bit Ubuntu

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.29-trusty/

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.29-trusty/linux-headers-3.12.29-031229-generic_3.12.29-031229.201409301235_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.12.29-trusty/linux-image-3.12.29-031229-generic_3.12.29-031229.201409301235_amd64.deb

Install
dpkg -i linux-headers-3.12*.deb linux-image-3.12*.deb

Remove
apt-get purge linux-image-3.12.0-* linux-headers-3.12.0-*

 

Remove all unused kernels in debian based systems

http://www.unixmen.com/remove-all-unused-kernels-with-1-command-in-debian-based-systems/

sudo apt-get remove $(dpkg -l|egrep '^ii  linux-(im|he)'|awk '{print $2}'|grep -v `uname -r`)

If it doesn’t work, try this:

dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

http://www.commandlinefu.com/commands/view/10520/remove-all-unused-kernels-with-apt-get