I came across this article and thought it useful enough to make a local copy, mainly to simplify the version-checking of the various tools needed to upgrade to the 2.4.x Linux kernel; then I thought I'd annotate it relative to what I found and thought about the process; then I thought I'd actually document my adventures in upgrading the kernel inline within the document, and put it up at www.finchhaven.com
I'm going to put my comments inline via the <tt> </tt> tags to render them differently from the article.
Having said that, on with the show...
From the article at freeos.com
The 2.4.x kernel packs a completely revised networking core and support for cutting edge technology. Let's see what's new and useful here and then move on to upgrading your system to the 2.4.x kernel from the 2.2.x kernel that you're likely to be running.
The Linux kernel is the heart of the operating system. It is important that it is kept up to date and working properly for your system to work at its optimum potential. The stable 2.4.0 kernel is a conglomeration of patches and additions that have been made throughout the experimental 2.3.x series of the kernel.
OK: so I've currently got a fresh install of Red Hat 6.2 that's almost one year old, running on a Pentium 150 classic, 48mb ram-powered box that's my firewall. That's what I'm going to work on, first.
No X; CLI only...
[root@sparky /home/jsage]# uname -a
The biggest addition comes in the form of the much-publicized support for the Itanium, Intel's 64bit processor. While the processor itself is slated for release later this year, the present support allows users to easily migrate to a 64bit processor and take full advantage of the processor's architecture. For home users, the IA64 support doesn't mean much as it will take time for prices to come down and become affordable. Additionally, support for IBM S/390 systems has also been added.
PNP support for ISA devices has finally become stable. Also support for USB devices has been improved and PCMCIA/PC Card support has become mature. These may very well be some of the good reasons why you may want to upgrade the kernel.
OK: this is good. PNP/ISA support has been an occasional issue. And I do have USB ports over in another box, an AMD K6-2 500, so that looks promising..
As far as file systems are concerned, the inclusion of UDF will benefit DVD and CD-RW users. Don't get too excited though, as DVD video playback support under Linux still remains flaky. ReiserFS is available in the 2.4.1 kernel release but is having some stability problems.
DVD? OK: interesting, later, on the other box...
Another good reason for upgrading to 2.4.x would be to make use of the highly improved networking core, which was optimized for speed and completely revised. The NFS code has been improved and should cause lesser headaches and it even supports the latest revision of NFS namely NFSv3.
Bingo! That's what I want. I've become highly interested in ipchains firewalling on the Pentium 150 box, and I've heard a lot about netfilter/iptables, the replacement for ipchains in the 2.4.x version kernel.
One of the notable changes with this kernel is the inclusion of Device Filesystem or DevFS. Unlike the large list of device nodes in the /dev directory which point to the devices, DevFS cleans up some of the clutter by created device nodes on the fly when a specific driver is loaded. The structure of /dev will also change with device nodes placed inside different categories. DevFS is not installed by default.
OK: of some technical interest...
It is very clear that most of the improvements are for non-i386 users. If you need to use the improved ISA PNP, USB or faster networking core or the new sound/video/video4linux drivers it would be a good idea to go for the upgrade. However, if you don't find anything useful in the new features and do not want to tinker with your already well setup machine, you should probably stick on to your older kernel for some more time.
Oh heck, let's do it!
Still plan to upgrade your kernel?
The latest kernel available in the 2.4.x series is available from www.kernel.org/pub/linux/kernel/v2.4/ . After you have downloaded the kernel, move the kernel source into the /usr/src directory.
OK: this directly contradicts what is said in /linux/README of the 2.4.2 kernel sources I've downloaded and untarred. *That* says to untar the kernel sources *away* from /usr/src/linux. I'm doing that...
Now you need to make sure that supporting tools for the kernel are sufficiently up to date.
From /linux/README: "Compiling and running the 2.4.xx kernels requires up-to-date versions of various software packages. Consult /linux/Documentation/Changes for the minimum version numbers required and how to get updates for these packages."
OK: let's check it out:
(If we need to fix something, I'll <b> </b> bold it...)
* Gnu C
* Gnu make
hmm.. gotta fix that.
[root@sparky /home/jsage]# insmod -V
hmm.. so we gotta fix that.
[root@sparky /home/jsage]# tune2fs --version
OK.. gotta do that..
I don't have any immediate need for pcmcia stuff, but I've been dreaming about 802.11b wireless, so let's do it right.
[root@sparky /home/jsage]# pppd --version
OK.. gotta fix *that*
[root@sparky /home/jsage]# isdnctrl 2>&1|grep version
The article continues:
If you find that you have an older version of any of the following software, you can download the latest version from http://www.freshmeat.net. In most cases, if you already have a 2.2.x kernel, you won't require any additional downloading with the exception of a newer version of modutils.
Well, despite having a relatively new Red Hat install (2.2.14-5.0 kernel, built about March 2000), we've got work to do.
(And, actually I went beyond freshmeat.net and got most of these off kernel.org)
We need at least:
util-linux 2.10o, modutils 2.4.0, e2fsprogs 1.19, pcmcia-cs 3.1.21, and ppp 2.4.0
(Let's put a coupla <hr>'s in, right now, because some time is gonna pass, here...)
OK: at kernel.org - util-linux version 2.10s -- that'll do: we need at least 2.10o
"Util-linux is a suite of essential utilities for any Linux system. Its primary audience is system integrators and DIY Linux hackers. Util-linux is attempting to be portable, but the only platform it has been tested much on is Linux i386."
And again, at kernel.org, let's go ahead and get ver 2.4.3: modutils
"The modutils package contains utilities that are intended to make a Linux modular kernel manageable for all users, administrators, and distribution maintainers."
e2fsprogs version 1.19 -- we need 1.19
"The ext2fsprogs package contains essential ext2 filesystem utilities which consists of e2fsck, mke2fs, debugfs, dumpe2fs, tune2fs, and most of the other core ext2 filesystem utilities."
pcmcia-cs version 3.1.24 -- we need at least 3.1.21
"Card Services for Linux is a complete PCMCIA or PC Card support package. It includes a set of loadable kernel modules that implement a version of the Card Services applications program interface, a set of client drivers for specific cards, and a card manager daemon that can respond to card insertion and removal events, loading and unloading drivers on demand. It supports hot swapping of most card types, so cards can be safely inserted and ejected at any time."
And ppp version 2.4.0 -- which is what we need
"PPP Daemon for Linux, Solaris 2, *BSD, SunOS 4, Digital Unix, SVR4, NeXTStep, and Ultrix. This allows Unix machines to connect to the internet through dialup lines, using the PPP protocol, as a PPP server or client. Works with 'chat', 'dip', and 'diald', among (many) others. Supports IP, TCP, UDP and (for Linux) IPX (Novell)."
OK: So let's say right here that I'm a little leery of what's next. I have re-compiled my existing kernel several times, and I've installed lots of app's from source, but here we'll be tinkering with the very stuff that makes Linux run, or at least do as much as it can.
So let's do a little research, rather than just tarx'ing all these downloads blindly..
The kernel HOWTO (this is html single-page format, which allows me to search the whole thing..) is a good reference.
And, an interesting find at the Linux Documentation Project is "Linux from Scratch", which now has it's own web site: Linux from Scratch (which just became my *next* project..)
Linux from Scratch gives a tremendous amount of information about installing Linux from scratch (hence the name ;-) -- particularily all the packages needed to build a system from zero..
And once you download the kernel source, untar it somewhere and read /linux/README, and /linux/Documentation/Changes
Hey! RTFM, huh? Read everything! Don't come running to me if ya don't...
OK: So we got all the parts. Let's dig in. I moved all the support utilites off into a new directory where I've got lots of disk space, and untarred 'em.
tarx e2fsprogs-1.19.tar.gz(see page 176 of "Running Linux" for the bash scripts tarx, tarc and tart...)
And read README and INSTALL and all the other stuff..
and time passes..
OK: Check for preformatted man pages, and delete..
Check the syntax of /etc/fstab
It's just that easy ;-)
And, let's do the rest of 'em..
OK: modutils 2.4.3 was a little confusing: ./INSTALL suggests ./configure --help to see the command line switches; after some lengthy pondering about --exec-prefix, and looking at where stuff was, and what ./configure --help seemed to be saying, I decided to ignore the command line switches and just dive right in...
And then cd'ing into ./insmod ./genksyms and ./depmod and doing
...in each of them seemed to work just fine, so then I got smart and decided to repeat the
to confirm the new version, and the output scrolls off the top of the screen and I can't see what version I've got...
...but adding the -V switch to all the other commands in this package returns ver 2.4.3, so I'm not gonna sweat it.
I even rebooted (Damn! my uptime was 76 days..) and got no problems with anything finding or loading any modules, so it must be ok...
hmm.. Ya know, I'm gonna skip the pcmcia stuff.
Don't need it.
Nope: don't need it at all.
OK: ppp ver 2.4.0..
And read everything.. (most of this is about setting up and using pppd, which, I hope, [hehehe..] won't get munged-up by what I'm about to do, since I do have a working ppp dialup setup).
OK: hmm.. pppd --version yeilds "pppd version 2.4.0"
Cool.. wonder if the dialup scripts still work..
OK: util-linux ver 2.10s...
OK: I like this.
(This is why you RTFM, right?)
From the README:
"...the stuff in the subdirectories mount, fdisk, disk-utils, text-utils, misc-utils, sys-utils, getopt-* should be rather distribution-neutral, and installing it does no harm.
We'll be sure to avoid *that* like the plague...
OK: actually this util-linux thing is *rather* hard to get real information about. INSTALL says "...4) edit MCONFIG..."
So I'm going to press on regardless, and hope that I can *not* install the ./login-utils when I get to that point...
And, basically what I did was delete the line in the initial section of the Makefile, *after* I'd done make, that said "SUBDIRS=login-utils" so there was *seemingly* no subdirectory and that bad, bad stuff never got installed..
[root@sparky /home/jsage]# fdformat --version
OK: good to go..
Before you jump into compiling the kernel, move your older linux source kernel into a different directory to ensure that when you untar the 2.4.x kernel source, it doesn't overwrite your older kernel. For example,
# cd /usr/src
This will move your older linux source into linux-2.2.12 directory and untar the downloaded kernel into the /usr/src/linux directory...
Once again, this directly contradicts what's said in ./linux/README:
"If you have the full kernel sources, put the tarball in a directory where you have permissions (e.g. your home directory), and unpack it...
Good enough for me: I'll do this on the partition where I've got lots of space...
and that's as far as I am..Events just kinda overran this project; I only have so many hours in the day, and far too many interests, particularily network intrusion detection and analysis...
But the article continues, even if I didn't:
Rename your older vmlinuz and System.map, in case they are files and not symlinks, and create a new entry in lilo to allow you to boot into your older kernel for last minute bail out, in case the 2.4.x kernel bombs out!
© 1998-2001 FreeOS.com (I) Pvt. Ltd. All rights reserved.
Last modified: Sun Feb 24 10:03:02 2002