Linux Kernel Upgrade

Go Back
Braindump Index
Braindump Home

Upgrading the Linux Kernel

  1. cd /usr/src

  2. Download the latest (stable) kernel from:
    lynx ftp://ftp.kernel.org/pub/linux/v2.4
    [ Even numbered kernels are stable 2.0.x, 2.2.x, 2.4.x - odd numbers are development 2.1.x, 2.3.x ]

  3. rm the symlink linux which points to the old kernel version:
    rm linux

  4. tar xvzf linux-2.4.x.tar.gz
    [ the tar file contains linux/* hardcoded - so it will overwrite your existing kernel source if you don't remove the symlink first ]

  5. mv linux linux-2.4.x

  6. recreate the symlink:
    ln -s linux-2.4.x linux

  7. cd /usr/src/linux

  8. run:
    make menuconfig
    and set all the kernel options
    [ There is also 'make xconfig' if you're runng X-Windows, and 'make config' which just asks you a list of questions -- old and crusty, and no way to move back to the previous quesiton ]

  9. You will have to reconfigure /etc/lilo.conf if you're on a RedHat system, because it doesn't follow standards....
    RedHat:
    image=/boot/vmlinuz-2.2.14-5.0
          label=linux
          initrd=/boot/initrd-2.2.14-5.0.img
          read-only
          root=/dev/sda1
    
    Change it to:
    image=/vmlinuz
          label=linux
          read-only
          root=/dev/sda1
    
    [ /dev/sda1 is the first SCSI drive, /dev/hda1 is the first IDE drive ]

    I often set up 2 images so that I can go back to the old kernel incase I goofed up the configuration....

  10. If you are using a 2.2 kernel, you should increase the number of processes limit above 512. Edit the /usr/src/linux/include/linux/tasks.h file, and set NR_TASKS to something more reasonable like 2048.
  11. If this is the first time you are compiling this source tree, run a make dep first. Now run
    make modules && make modules_install && make bzlilo

  12. Be sure to grab and install the latest version of the modutils from:
    ftp://ftp.kernel.org/pub/linux/utils/kernel/modutils/v2.4/



Last modified: Wednesday, December 31 1969 @ 19:00 EST
Google
WWW braindump.MrZesty.net
© Ian Samuel, 2012
http://braindump.MrZesty.net