|
Guideline for migrating from the 2.4.x to the 2.6.x kernel
http://www.linuxfromscratch.org/ ... l-2_6-migration.txt
AUTHOR: Kris van Rens
kvrprogs AT edsko DOT com
DATE: 2003-12-20
LICENSE: GPL
SYNOPSIS: Guideline for migrating from the 2.4.x to the 2.6.x kernel
DESCRIPTION:
After a series of 11 test versions, the stable release of the linux-2.6 kernel
came out (linux-2.6.0), one day before I wrote this hint. I was working with
the 2.6.0test kernel a few months already for school (for the curious among
you; I learn how to design kernel driver modules). I noticed a few people on
the mailinglist having trouble installing the kernel, that's what made me write
this hint.
So, if you're one of the people wanting to try out the new 2.6.0 kernel, you
should probably take a look at this hint for a few tips to bring it to a
successful end. Of course the new kernel does not have to better for you, you
might have some trouble with NVIDIA-drivers or winmodems. You can always fall
back to the 2.4 kernel and wait a while before you'll try it again.
PREREQUISITES:
Before working through this hint, be sure to have the following:
*** module-init-tools sources tarball
Get this from http://www.kernel.org/pub/linux/kernel/people/rusty/modules.
*** linux-2.6.x kernel sources tarball
Get these from http://www.kernel.org or a mirror.
At the time of writing the version of the module-init-tools is 0.9.15-pre4 and
for the kernel it is 2.6.0, I'll use these version names for this hint, if you
have a newer version, replace the version in this hint with it.
Of course, you should also have Make, GCC and an Assembler, but this hint is
meant for the LFS-community so I'll assume you fulfill these requirements.
HINT:
So, you want to migrate from linux-2.4.x to linux-2.6.x? Well no problem!
Quite a lot changed since 2.4, both the SMP (Symmetric MultiProcessing,
multiple processor cores) and the uniprocessor power increased, compatibility
with hardware is better and new security-modules increase the security (!).
As being the owner of a LFS system, I'll assume you're familiar with the usual
way of installing a source package, and a kernel of course.
I cut this hint section in two; installing the new module-init-tools and
installing the kernel.
*note: If you have a Nvidia graphics card; or you want to use a winmodem or
you want to be sure that you don't have to undertake special steps, take a
look at the EXCEPTIONS area. It's always a good idea to take a look there.
***STEP 1: Obtaining and installing the new module-init-tools
To migrate from kernel 2.4 to 2.6 you'll need a new module loading system, the
system has been worked over completely.
As you like, move the tarball into the directory from where you'll install it,
for me that's /usr/src, and cd' into it.
Unpack the sources and sources and cd' into the source's directory.
tar xzf module-init-tools-0.9.15-pre4.tar.gz
cd module-init-tools-0.9.15-pre4
Then configure the package by:
./configure --prefix=/
We use prefix=/ here because in the LFS-Book the modutils are installed with
the same prefix and the last thing we want is having two different versions of
one program in multiple places.
If this is the first time you install the new module-init-tools, invoke the
next command, otherwise, if you're upgrading to a new version of
module-init-tools, skip it (LFS versions up to LFS-5.0 come with modutils and
do not have module-init-tools, so you'll have to invoke the command).
make moveold
This makes the modultils such as insmod,rmmod or modprobe to be renamed
to insmod.old, rmmod.old and modprobe.old. The new to be installed
module-init-tools do a runtime check which kernel is running and invoke the
right version of the tools, for example if 2.4.x is running the insmod command
will use insmod.old instead.
Then make the package and install it with:
make
make install
The last thing you'll have to do is to generate a new configurationfile for the
modules:
./generate-modprobe.conf /etc/modprobe.conf
If you're using the device-filesystem also copy the modprobe.devfs into /etc.
If everything went fine, you have the new module-init-tools and you're ready to
install the new kernel!
***STEP 2: Installing the 2.6.x kernel
Copy the linux-2.6.0 tarball to /usr/src and cd' into this directory.
As usual, unpack the sources and cd' into the sources directory:
tar xjf linux-2.6.0.tar.bz2
cd linux-2.6.0
Now configure the kernel, this is just like with the 2.4 kernel, you can choose
from menuconfig and xconfig. Menuconfig is based on Ncurses and xconfig is
based on QT. Do so by:
make menuconfig
or
make xconfig
Now comes the most time-spending and difficult part, the configuration itself.
As far as I know, you cannot use the kernel-2.4 configuration file. So you'll
have to do it all from the start, which is better anyway, because a lot changed
in the structure of the menu and there are loads of new options in it.
Be sure to take the right systemarchitecture in >>processor-type and features<<
and the right filesystem. If you don't know whether you should involve a
certain option or not, press ? or help; there's info about almost every option.
If you still don't know, search or ask the community.
If you're done, you are set to compile the kernel with:
make all
This can take quite a while, on my Pentium 4 2.0GHz with 256MB RAM, it took
about 15 minutes, which is not strange because the kernel code is around 5
million lines of code! You can time your build with >>time make all<< instead.
Then install the modules with:
make modules_install
Now copy the kernel to /boot:
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.0
Or to another filename as you want.
Now modify your lilo.conf (for lilo) of menu.lst (for grub) to be able to load
the new kernel, if you have lilo, don't forget to invoke /sbin/lilo and re-
write the boot-record.
If everything went right, you can reboot and start with the new kernel.
If there are errors during the booting, read the error-output carefully and
eventually reconfigure the kernel. Otherwise if your screen is black, it has
probably something to do with the framebuffer device, also reconfigure the
kernel and try again. Or try vga=normal in your bootloader configuration, and
check if 'CONFIG_VT' is set to 'y' in your .config file.
You should look at the EXCEPTIONS field, you might have to do some additional
work to get your kernel work properly.
If the problem is really stubborn and you can't get it away, read the
mailinglist archives or ask a new question there.
Otherwise, congratulations with you're shiny new 2.6 kernel!
EXCEPTIONS:
***Nvidia drivers for the 2.6 kernel:
If you have a Nvidia graphics card, you'll have to make the drivers for it
separately, the standard kernel does not support them (well). Take a look at:
http://www.minion.de
Here you will find the (widely tested) patches for the Nvidia drivers, and some
help to install them.
***WinModem drivers for the 2.6 kernel:
Lucent Technologies provides a driver for WinModems, you can get it here:
http://linmodems.technion.ac.il/ ... -2.6-alk-v00.tar.gz
Or (not tested):
http://www.cs.cmu.edu/~rajesh/ltmodem-2.6.tar.bz2
OTHER DOCUMENTS ABOUT THIS SUBJECT:
The post-halloween document from Dave Jones:
http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt
The German translation of it:
http://www.kubieziel.de/computer/halloween-german.html
ACKNOWLEDGEMENTS:
Professor Dr. Juergen Quade from the Niederrein University for printing me
out the preleminary version of the 'Meister-Installateur' article for
the Linux Magazin.
CHANGELOG:
[2003-12-19]
First version 1.0
[2003-12-20]
Version 1.1
*Changed DATE format to intl.
*Structural fixes + some typos
*Added the EXCEPTIONS field; thanks Alexander! |
|