Compile and Install new Linux kernel

Get new kernel source from (in this example we use the kernel version) and unpack into /usr/src/linux...... directory

sudo su
cd /usr/src
bzip2 -d linux-
tar xvf linux-

Clean the new kernel version

chown -R root:root linux- 
cd linux-
make mrproper
cd ..

Copy old kernel configuration file (optional)

cp linux/.config linux-
rm linux

Set linux link to new version

ln -s linux- linux

Stamp the kernel (optional, but highly recommended)

cd linux
date '+js%m%d-%H%M' > localversion

Convert old configuration file (optional, only if you have an old configuration)

make oldconfig

If you want to make any changes to the kernel configuration

make menuconfig

Before you proceed, double-check that the LILO configuration includes at least one kernel version that is known to work. Check that this kernel does exist in the /boot directory, the required modules are in /lib/modules and that the entry in /etc/lilo.conf matches those locations and names. Proceed only if you have checked that you will be still be able to boot if the newly built kernel is not bootable.

Build the kernel & modules, install and add to LILO

make modules_install
make install
Comments (0)