[ Monday 6th October 2008 ]
 
 


In under 10 minutes...

Back

  The Slackware Guide to installing Kernel 2.6
This tutorial will explain in details every step you need to do to have a 2.6 kernel up and ready in a few minuts. This tutorial is originally based on
This Thread
But with my additions of explaining each stage, and what each command does.

This might look long, but its only because i'm explaining in detail, so you know what you're doing.
 
 
  The Procedure

There are 4 stages to getting your 2.6 working
1- get your system ready for 2.6
2- download and unpack kernel
3- configure kernel
4- compile kernel

===========
STAGE 1: Getting Ready
===========

Before starting, we need to edit the system to make it compatible and ready for
the 2.6 kernel. (2 steps)

Step 1

download these neccesary packages and install them

udev (currently version 054)
http://slackware.com/pb/searchpkg.p...amp;string=udev

diffutils (currently version 2.8.1)
http://slackware.com/pb/searchpkg.p...amp;string=diff

module-init-tools (currently version 3.1)
http://slackware.com/pb/searchpkg.p...ing=module-init


Step 2
we need to make two backups of the kernel. The first one is this original kernel
you have right now (the 2.4.29, soon to be obsolete), and the second backup is
so that everytime you compile a new kernel, you have the ability to go back to
the last good compiled one incase anything went wrong.

if you ls /boot , you will see a vmlinuz-ide-2.4.29 . Keep this file name in
handy..

now, edit lilo.conf

code:
pico /etc/lilo.conf


add an entry at the bottom, which would look like this
code:
image = /boot/vmlinuz-ide-2.4.29
  root = /dev/hda1
  label = SlackOld
  read-only

Note: replace /dev/hda1 with your root directory if needed.

And add the second entry like so,
code:
image = /boot/vmlinuz.old
  root = /dev/hda1
  label = Slack10.old
  read-only

That one is the last successul compiled kernel. Save, and exit.

Now we're ready to start the upgrade.

=================
STAGE 2: Downloading and unpacking
=================

1- Download the kernel.

Currently, the latest kernel is 2.6.11.7. Download it from kernel.org. The
direct link is
code:


copy or download that file into your /usr/src/ folder

if you have a link in /usr/src called linux, delete it.
code:
cd /usr/src/
rm linux


unpack the kernel
code:
tar xvjf linux-2.6.11.7.tar.bz2


make a link to the new kernel and change directory into it
code:
ln -s linux-2.6.11.7 linux
cd linux


To save time after compiling, i like linux to automatically move the new kernel
into boot, and to update lilo for me. This is done like so,

Edit the Makefile, search for the line '#export INSTALL_PATH=/boot' and
uncomment it.
code:
pico Makefile
ctrl + w   (type boot)
remove the leading #
save and exit.


Now we're ready to configure the kernel.

==============
STAGE 3: Configuring
==============

You need a .config file. You could either
- start from scratch and edit the new kernel, which is very long and
proan to errors.. or
- use your existing 2.4.29's .config file (not really recommended), or
- use someone else's .config file as a basis, modifying and
changing/enabling what you need.

To start from scratch, type
code:
make menuconfig
(if you're in a command line)


code:
make xconfig
(if you are running from a graphical interface, like KDE.. its
easier on the eyes.)



If you want to use your 2.4.29 config, just copy it over
code:
cp ../linux-2.4.29/.config ../2.6.11.7/

alternitevly, if you alread already have a 2.6.11.6 .config, you can use that
(recommended, especially when you're upgrading kernels later on)
code:
cp ../linux-2.6.11.6/.config ../2.6.11.7/


The main thing to note is that you need a .config

now we're ready to compile our kernel.

============
STAGE 4: Compiling
============
all you have to do is type

code:
make
make modules_install
make install

have some green tea, and wait till its done.. That's it :)

When you're all done, just reboot. Congrats... :)

--------------------------------

Note: Keep your .config file handy.. back it up. Whenever a new kernel comes out, all
you have to do is download the source, unpack, copy the .config over, and
code:
make
make modules_install
make install

and in 15 min, you have the latest kernel again.

__________________
Avtomat KaXushnikova
\/ushi do.t co do.t uk
/\