Jun 17, 2015

Ubuntu Linux Kernel Update

Any Linux developer, soon or later will need compile or re-compile the kernel, whatever is your motivation, curiosity, learn, enable/disable features, this is an important step, because allow us to understand a little more about the Linux itself. Here you can see how update the Linux kernel of Ubuntu 14.04.2 with GRUB boot loader.

The idea is simple, get the latest stable version from kernel.org, compile it and update the boot loader. First let's check the current kernel version:

uname -r

Get the latest one:

wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.0.5.tar.xz

And move it to the proper location of kernel sources:

mv linux-4.0.5.tar.xz /usr/src

Go to "/usr/src", extract it:

tar -xvf linux-4.0.5.tar.xz

And configure the kernel features:

cd linux-4.0.5
make menuconfig

Maybe at this point you will see an error about the ncurses library, because the menuconfig uses it to generate the screen menu, so just install the library:

apt-get install ncurses-dev

Then save, exit and compile the kernel (this will take a lot of time):


And the modules:

make modules

Now install the modules, this will copy them to "/lib/modules/<kernel version>":

make modules_install

And finally create a new entry for this kernel version in the GRUB ("/boot/grub/grub.cfg"):

make install

That's all! reboot and check the new version:

uname -r

0 comentários :

Post a Comment