PDA

View Full Version : Upgrading the Linux kernel to 2.4.24



forrest44
11-01-2004, 12:47 PM
Hi

I am running redhat linux 9 with kernel 2.4.20-8 and want to upgrade the kernel to 2.4.24 or so because the system crashes because of a USB glitch or something :-(.

How do I go about compiling and installing it??????

Forrest.

Graham L
11-01-2004, 02:35 PM
If you have the source of the distribution version installed, read the file /usr/src/linux-2.4.18/README. (I think it's 2.4.18 ... you'lll find it if it's there)

Basically, you get a copy of the source package ... 20 or so MB. It will probably be a tar.gz ot .tgz package. In either case, as root, cd /usr/src
tar xvzf /path/to/the/sourcesfilename.tgz
cd linux-2.4.20
less README
then make xconfig or make menuconfig . Take your time over that. Somehow it always takes me a few goes to get it right. It's a good idea to edit the Makefile and put your name into the EXTRAVERSION variable. thenmake dep
make bzImage && make modules && make modules_installThen it's time to make a cup of coffee. (or several ... it takes a while on a 486/66).
make install (followed by lilo is supposed to install the kernel , but I don't really trust anything like that, and my RH9 has grub anyway, so I do cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.xx-myextraversion
cp System.map /boot/System.map-2.4.xx-myextraversion, then change grub.conf to suit. I normally keep the older version as the default until I am sure the new one works properly. :D

The distribution uses a two stage boot --- because they can't assume what the boot device will be they compile everything as modules, and the first stage is just a minimal boot to a ramdisk, then it sorts out what is what and does the real boot. Make sure you select the actual hardware as (Yes) rather than [m] (module) and you don't need to make that rdimage.

Jen C
11-01-2004, 05:47 PM
If you didn't want to compile and install the kernel yourself, have a look under Red Hat Network up2date program. You might find the kernel listed there, in which case it will download, install and update your boot loader automatically.

Or you could go and download the kernel in a pre-compiled RPM format from the Red Hat ftp server (ftp://updates.redhat.com/9/en/os/).

But compiling the kernel yourself is quite fun (and a good learning experience). I just compiled the 2.6-0 kernel last week myself and it is great to have a kernel that has been built specifically for your hardware. :)