This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

Blog About Dedicated Servers

« | »

Upgrade the Linux Kernel

Luigi Ramone | 15 December, 2005 20:46

We've used the following instructions to upgrade our Linux Kernel at Rackshack from 2.4.9-31 to 2.4.18.

There were no problems, and we did not have to get Rackshack technical support installed.

Please note that upgrading the kernel can be dangerious and it is possible to freeze your system bad enough that Rackshack support has to get involved.

I would recommend reading the README file included with the kernel source prior to following these steps. It will provide an outline along with recovery techniques (if needed).

If this is something you want some one with system administration capabilities (for a fee) to do, please contact us. Otherwise, enjoy.



1. Download the full source of the latest kernel from http://www.kernel.org/ to /usr/local/src on the machine to be upgraded.

2. gzip -cd <kernel> | gtar xvf -

3. cd <kernel dir name>

4. Create the following shell script (I called mine, "steps.sh"):

#!/bin/sh
make dep
make modules
make modules_install
make bzImage
cp arch/i386/boot/bzImage /boot
make
make install

5. Make it executable (chmod 755 script name).

6. Run make menuconfig

make menuconfig

IMPORTANT

If you were on a kernel that did not have IPtables support, make sure you do the following changes under "Networking Options":

A. Enable "Network packet filtering (replaces ipchains)"

B. Go into IP: Netfilter Configuration and make modules of all options, and permanent for the following:

(1) Connection tracking and FTP protocol support
(2) IP tables support (required for filtering/masq/NAT)
(3) Packet filtering and Reject
(4) Full NAT and all under it.
(5) Packet mangling and all under it.

C. Make any other changes are required

Potentially enabling "Ext3 journaling file system support (EXPERIMENTAL) " under file systems

(This is supposed to help with crashes).

NOTES:

Most of the configuration options other than noted
above should be good "as is."

If you want to stick with ipchains, this is what I
believe you must do (I have not done it, therefore
it is untested):

Do A.
Then in B, make permenant ipchains (you may
have to unselect modules in order to get
ipchains to show.

7. Save your changes.

8. Run the script you created.

9. Check the /boot directory that the following files are present / created:

bzImage (recent date and time showing you just made it)
System.map linked to the latest
vmlinuz linked to the latest
vmlinuz-version for the latest

10. Copy /etc/lilo.conf to /etc/lilo.conf.save

11. Edit /etc/lilo.conf

Create another "image" section pointing to

A. Point the boot image to vmlinuz-version
B. Point the initrd to bzImage
C. Change the old labels to something other than "linux"
D. Make sure you new section has a label of "image"

(sample lilo.conf file)

boot=/dev/hde
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
linear
default=linux

image=/boot/vmlinuz-2.4.9-31
label=linux.bak
initrd=/boot/initrd-2.4.9-31.img
root=/dev/hde6
read-only

image=/boot/vmlinuz-2.4.18
label=linux
initrd=/boot/bzImage
root=/dev/hde6
read-only

12. Run "lilo"

13. Restart the server

14. uname -a should report the new kernel version.

15. depmod -a should report no problems. If it does, then either modules have to be specified or made permanent.

Ending Notes:

We did this on a Compaq box running Ensim. Ensim and other applications where not impacted by the upgrade; all worked fine.

Credits:

http://www.dynamicnet.net/services/hsphere.htm

Add comment

Topic

Text

Your name

Your email address (if any)

Your personal page (if any)


authimage




Powered by Boonic, Bloogo & pLog
This Blog does not have any affiliation nor relation with the mentioned companies. All the logotipos, trade names and images are property of the companies that registered them.