Updated: Tue, 10 Feb 2004 07:26:02 GMT
Linux Step By Steps

Migrating to Linux kernel 2.6 on recent Redhat systems

Written by Klaus-Peter Schrage on 26-Dec-2003

This notes are mostly written in real first person style. There are already some clever writings on migration, Redhat related or more general in nature, (see recommended reading below), so I will focus on the (few) gotchas that I have met on my way to a smoothly running kernel.

Generally speaking, migrating from 2.4 to 2.6 kernels is easy - quotation from [3]: "I spent a whole day migrating my GNU/Linux RedHat 9 system to a 2.6 kernel today." Only a whole day? Some people seem to be a lot smarter than I ...

You shouldn't start your first kernel recompile on the occasion of migrating to 2.6 (there are precompiled 2.6 kernels for Redhat to be found in [8]). So it is assumed that you have done a recompile of a 2.4 kernel before.

Addendum:

Some observations after running a 2.6.x kernel for some time now are included further below.

Prerequisites

Of course, the latest kernel source from www.kernel.org or better, from one of the mirrors. You may unpack it with

   tar xvfj ~/linux-2.6.X.tar.bz2.

It is a good idea to take a look at

   /usr/src/linux-2.6.0/Documentation/Changes
then where the neccessary utilities and packages for a succesful kernel compile are listed. But I have found out that, on my well trimmed Redhat 9 system, only two items were out of date:

Configuring the 2.6 kernel

When you have done this before on 2.4 kernels, there should be only few elements of surprise, although the mechanisms of kernel configuration have completely changed. In the beginning, you should still do

   make mrproper
but that's neccessary only once in the the kernel source's liftime.

When you have a working configuration file from 2.4, you can copy it to the upper 2.6 source directory as .config and do a

   make oldconfig.
This will preserve most settings and will prompt you only for new items. But it's indispensable to go into more details with
   make xconfig
which has a complete new look and feel, and even the good old
   make menuconfig
has undergone a face-lift. I found both very convenient to use.

You will recognize most items at once, although they have been restructured somewhat (not always to greater clearness, most of the known stuff now is hidden under 'Device Drivers').

I don't want to go into the configuration details - they are well described in [1] or [2]. Items that I have misconfigured at the first trial (and which haven't been preserved by the initial make oldconfig) were:

Compiling the kernel

It's only

   make
   make modules_install.
and when you are lazy
   make install
No more 'make dep', 'make modules', 'make clean' ...

'make install' will save you the labour of copying the kernel image and system.map over to the /boot directory and of adjusting /boot/grub/menu.lst (or lilo.conf).

Modules

The module configuration file now is called

   /etc/modprobe.conf.
There is a script
   /sbin/generate-modprobe.conf /etc/modprobe.conf
to copy entries from the old modules.conf - it produces a lot of noise. I had to manually change the alias for USB support to read like
   alias usb-controller uhci-hcd
as this is the new name of the USB module.

The sound of music ...

As ALSA is the kernel makers' preferred sound system now, you may configure its support in the kernel configuration process (as modules). This is quite straightforward, but there are some extra steps to take apart from this:

Reboot ...

The new kernel really booted at the first trial, but many things weren't running.

   lsmod
showed: no modules loaded at all. This was due to a twist in Redhat's 2.4 version of the startup script
   /etc/rc.d/rc.sysinit
which switched off support for loadable modules (and hotplugging) completely. There are hints how to manually fix rc.sysinit (eg. in [2]), but I found it more convenient to get a complete new initscripts package from [8] Even then, you may do some beautifying fiddling with the script ... but it works.

Three months later ...

Most of my post-upgrade issues were USB related, as I have substantially enlarged my zoo of USB devices lately: a digital camera, a flash card reader ... I will only mention one teaser (and I dont want to talk about my USB scanner which I had been using for years via the 'scanner' module, now disappeared with the 2.6.3 kernel):


Further / prerequisite reading


[1] David A. Bandel: Kernel 2.6.x, the new breed (http://linuxbooks.pananix.com/kernel2.6.htmt)

[2] Jim Brooks: Building Linux Kernel 2.6 on Red Hat 8 (http://www.sabalsoftware.com/article_buildingKernel26OnRedhat8.php)

[3] Thomer M. Gil: Migrating to Linux Kernel 2.6 (http://thomer.com/linux/migrate-to-2.6.html)

[4] jeremy: HowTo Upgrade To The 2.6 Kernel (http://kerneltrap.org/node/view/799)

[5] Robert McLeay: Upgrading RH9 to 2.6.0-test4 (http://www.fearthecow.net/index.pl?section=guest&page=kernel)

[6] Oliver Diedrich: The Next Generation - Linux 2.6. c't 24/2003, p. 194. (http://www.heise.de/ct/03/24/194/)
(Sorry, it's in German, but it's excellent ...)

Sources

[7] www.kernel.org/pub/linux/kernel/people/rusty/modules

[8] http://people.redhat.com/arjanv/2.6/RPMS.kernel/

[9] http://www.machineofthemonth.org/articles/2002/1216/

searchSearch Index