![]() |
![]() |
| Linux news | Newbie's Linux manual | Linux links | Link us | ||
| The Linux columns | Book reviews | ||
| DistroWatch + TuxReports | November 2, 2002 | |
Contents | Previous | Next | Download
- 1 -
Download the latest 2.4 kernel source code here. For this tutorial the file linux-2.4.17.tar.bz2 is used. It's recommended you download the bzipped tar (*.tar.bz2) instead of the gzipped tar (*.tar.gz) since the bzipped version is just over 20% smaller. A saving of 5.7Mb for the 2.4.17 kernel source.
- 2 -
In the directory you downloaded the kernel source code to, and as root, enter:
tar xvfj linux-2.4.17.tar.bz2 (or tar xvfz linux-2.4.17.tar.gz)
mv linux /usr/src/linux-2.4.17
cd /usr/src/linux-2.4.17
- 3 -
It's now time to configure everything to your liking--prior to building the kernel image. The graphical configuration utility is friendlier than the console version, so in X, enter:
make xconfig
Note:
If you prefer to do things at the console, enter make menuconfig instead.
- 4 -
Now I know all this looks pretty scary, but the included help is excellent, and you'll soon have the hang of it. Just select the first option on the list, Code maturity level options, and select the Help button to the right for help on that particular option. When you're finished with Code maturity level options, select the Next button to move onto the next set of options, and so on.
When you're finished, select the Save and Exit button.
Note:
- 5 -
Now enter each of the following in turn:
make dep
(Ensures everything gets built in the right order.)
make clean
(Cleans out information from previous compile. So not required the first time.)
make bzImage
(Creates the new kernel image.)
make modules
(Creates the new kernel modules.)
make modules_install
(Installs modules to /lib/modules/kernel.version.number)
- 6 -
As long as it's a x86 PC your using, enter:
mv arch/i386/boot/bzImage /boot/vmlinuz-2.4.17
Now you need to tell Grub (if that's the boot loader you're using) about the kernel image so it can boot it.
- 1 -
Enter:
vi /boot/grub/menu.lst
...and enter the following at the end of the file:
title Linux (2.4.17)
root (hd0,0)
kernel /vmlinuz-2.4.17 ro root=/dev/hda2
A brief discussion of the above:
| title Linux (2.4.17) | What appears in the Grub boot menu for this kernel. Unlike Lilo, spaces are fine. |
| root (hd0,0) | Where the kernel is stored, so that partition can be mounted (read-only). hd0 means your first hard drive, and the second 0 means the first partition of that hard drive, i.e., the equivalent of /dev/hda1. |
| kernel /vmlinuz-2.4.17 ro root=/dev/hda2 | The kernel to load. Note that if you have a separate /boot partition the kernel's path starts from / and not /boot. |
- 2 -
Reboot your computer to test the new kernel. If it doesn't work--don't panic. You still have your old kernel to fall back on.
Now you need to tell Lilo (if that's the boot loader you're using) about the kernel image so it can boot it.
- 1 -
Enter:
vi /etc/lilo.conf
...and enter the following at the end of the file:
image=/boot/vmlinuz-2.4.17
label=newlinux
read-only
root=/dev/hda2
...making sure to change the vmlinuz-2.4.17 part to whatever you called the kernel image in step 6, and the hda2 part to wherever your root (/) partition is located. (Simple to determine since the other root= entry in this file will tell you). The newlinux part is what you enter at Lilo's boot: prompt to boot this particular kernel image. Change it to whatever you want. Now save and exit Vi.
- 2 -
Enter:
lilo
...to update Lilo with its new configuration. (An asterix (*) will appear by the default operating system to be booted by Lilo.)
- 3 -
Reboot your computer to test the new kernel. If it doesn't work--don't panic. You still have your old kernel to fall back on.
Contents | Previous | Next | Download
| About us | |
| Latest stable kernel: 2.4.19 | Latest development kernel: 2.5.44 Copyright © 1998-2002 Linuxdot.org. Linux ® is a registered trademark of Linus Torvalds. |
|