15 Facts About the Linux Kernel

Celebrating the 15 year anniversary of the Linux 1.0.0 kernel, Junauza posted a list of 15 cool facts about the Linux kernel.  Here are a few of my favorites:

- An asteroid was named after the creator of the Linux kernel.

- According to a study funded by the European Union, the estimated cost to redevelop the most recent kernel versions would be at $1.14 billion USD.

- Linux kernel 1.0.0 was released with 176,250 lines of code. The latest Linux kernel has over 10 million lines of code.

- The Linux kernel can be found on more than 87% of systems on the world’s Top 500 supercomputers.

Read the full article here.

If you’ve had the same Ubuntu installation for a while and have just been upgrading to newer releases, you may have noticed that a lot of older kernel versions are piling up in your grub menu and on your system.

How to remove older kernels from Ubuntu

This can be done by using the Synaptic Package Manager, however I will show you how it is done on the command line.

First, find out what kernel you are currently running:

# uname -a

Linux foogazi 2.6.24-19-generic #1 SMP Wed Jun 18 14:43:41 UTC 2008 i686 GNU/Linux

From the output you can see that you are currently using the 2.6.24-19-generic kernel.

Next, let’s take a look at all of the kernel versions you have installed:

# dpkg -l | grep linux-headers-*


linux-headers-2.6.24-16                    2.6.24-16.30                                       Header files related to Linux kernel version
linux-headers-2.6.24-16-generic            2.6.24-16.30                                       Linux kernel headers for version 2.6.24 on x
linux-headers-2.6.24-19                    2.6.24-19.34                                       Header files related to Linux kernel version
linux-headers-2.6.24-19-generic            2.6.24-19.34                                       Linux kernel headers for version 2.6.24 on x
linux-headers-generic                      2.6.24.19.21                                       Generic Linux kernel headers

Now all you need to do is remove the old versions with apt-get.  Since we’ve noted with uname -a that we are currently running 2.6.24-19-generic we want to make sure we do not remove it.  All of the others can be removed.

# sudo apt-get remove linux-headers-2.6.24-16 linux-headers-2.6.24-16-generic

Now the older kernels are gone.  Repeat the apt-get remove step to remove any others you may have.  Remember to not remove your current kernel.

Important note: It is a good idea to keep at least one old kernel version around in case anything breaks in your current kernel and you are unable to boot into it.  An example would be that you boot into your current kernel but recieve a kernel panic.  With an old kernel still available you can reboot the computer and select the older kernel version from the Grub menu and still access your system to find out what is going on.

Compile an Ubuntu Kernel from scratch

This complete guide to compiling an Ubuntu kernel is very well detailed. The purpose of compiling your own kernel is to tune it specifically to your hardware specifications, as sometimes the install CD provides you with a generic kernel set up.

Linux Kernel 2.6.23

The Linux Kernel version 2.6.23 was released yesterday, October 9th, 2007 that includes some great improvements.

2.6.23 includes the new, better, fairer CFS process scheduler, a simpler read-ahead mechanism, the lguest ‘Linux-on-Linux’ paravirtualization hypervisor, XEN guest support, KVM smp guest support, variable process argument length, make SLUB the default slab allocator, SELinux protection for exploiting null dereferences using mmap, XFS and ext4 improvements, PPP over L2TP support, the ‘lumpy’ reclaim algorithm, a userspace driver framework, the O_CLOEXEC file descriptor flag, splice improvements, new fallocate() syscall, lock statistics, support for multiqueue network devices, various new drivers and many other minor features and fixes.

Check out the rest of whats new in the Linux Kernel 2.6.23..