Last Updated: December 26, 2018
· _jeffreyjackson

Linux Kernel Upgrade

I use Slackware because I'm old school. :)

Anyways, if you want to upgrade your kernel this should work with almost all distros. Keeping your kernel up to date, let's your machine operate at peak performance while keeping the security issues at a minimum.

xLet's get started by dropping our old symlink and fetching the kernel source.

cd /usr/src
rm linux

At the time of writing this, 3.8.2 was the stable release. You will want to get the freshest kernel so go check out kernel.org.

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.2.tar.bz2

This unpacks the tar and creates a new symlink to work within:

tar -jvxf linux-3.8.2.tar.bz2
ln -s linux-3.8.2 linux

Let's get started building. First let's grab our old config, and build off that. I usually save my config files along with my kernel so I always know how I built it last time. More on this later...

cd linux
cp /boot/config .config

Open up menuconfig to start looking at any changes you need to make. Read the docs and see if there are any new features to the kernel. It's good to familiarize yourself with the kernel. This is a great place to see how it's all laid out. Alternatively, if you want a little help migrating your kernel you can try 'make oldconfig' first.

make oldconfig
make menuconfig

Once you've saved your configuration changes, it's time to compile the kernel. This is a great opportunity to make coffee or do push-ups. You will probably have time to do both actually...

make bzImage
make modules
make modules_install

Now let's move your fresh custom kernel to the boot directory.

cp arch/x86_64/boot/bzImage /boot/vmlinuz-3.8.2
cp System.map /boot/System.map-3.8.2
rm /boot/System.map
ln -s /boot/System.map-3.8.2 /boot/System.map

Remember how I said I move my config files along with it? I do a naming convention of "config-datetime-kernel_version", so this way I know which config is the most recent and which kernel it was intended for.

cp .config /boot/config-201303061511-3.8.2

With this particular Linux install, I'm using lilo. If you're using grub or another boot loader you should look up on how to register the new kernel.

nano /etc/lilo.conf

When editing the lilo.conf file, our intention is to point to the new kernel. Here you can set up multiple entries, or you can just update your existing entry to point to the new kernel. I usually just keep 1 kernel in my boot list, but remember you have your new and old(er) kernels in the /boot directory so you should always have a fallback plan if you need one.


image = /boot/vmlinuz

to the new kernel:

image = /boot/vmlinuz-3.8.2

Write the changes by executing lilo:


That should do it! Now go enjoy your new kernel:


2 Responses
Add your response


seems useful , I am stuck at the upgrade of 3.8.2 only will try it..


over 1 year ago ·

thanks ..
It worked for me . These steps are quite explanatory.
as I am having grub2 on my fedora 18, after the step "cp .config ..."
I just skipped the lilo related steps and executed
"grub2-mkconfig -o /boot/grub2/grub.cfg" and then reboot.
and its done..


over 1 year ago ·