Kernel Compiling.
This assumes that you have a reasonably recent kernel. If you don't know
what you're doing then be warned - I'm not taking any blame. If you have
any crucial work on the computer I suggest you back it up. Also see the
notes section for instructions on backing up your old kernel. Finally if
you don't know what you're doing, by all means try it, but back up any
important information - and don't try it on your work's vital server. Maybe
play around with a "toy" computer first.
-
If you want to upgrade your kernel version visit www.kernel.org
or preferably an international mirror www.kernel.org
mirrors. Note that if you upgrade your kernel you may have to upgrade
your tools and startup scripts as well. Unpack the source code in the directory
/usr/src
-
Look in the /usr/src directory for a subdirectory called linux or linux-<version>
Note that there is generally a different directory for different versions.
Change into the directory corresponding to the version you wish to compile.
-
Type make menuconfig
-
You may now select options in the submenus for how you want the kernel
compiled.
-
If you see a module you would like to change, select it using the up and
down arrows then press: Y = Yes (inside kernel), M = Modules (can be loaded
by kernel), N = No (cannot be loaded at all)
-
Special notes: You must compile the IDE driver, ext2 filesystem
and VGA driver inside the kernel. If you want them, you should compile
the aout and misc executable file format kernel support inside the kernel.
It is generally a good idea to compile in most of the file-systems you
are going to use (it helps when you are trying to recover from a kernel
problem).
-
The default settings should almost always work - so you only need to change
a few specific settings, relating to what you need.
-
When you are finished exit by pressing Escape. It will ask if you want
to save the settings.
-
Type make dep This figures out the dependencies.
-
Type make clean
-
Type make bzImage
-
Now it is time to install the new kernel. Please see the notes about backing
up the kernel.
-
Type make bzlilo This should work, unless you have been playing
around with the lilo settings. See Notes for more details.
-
Type make modules
-
Type make modules_install
-
Make sure that lilo is configured in the way that you want, and install
any other packages which you will need to boot up the kernel (if you are
upgrading).
-
Reboot.
Notes:
-
To do a full, no-holds-barred clean, type make mrproper This will
also delete your configuration file too (.config) so back it up if you
want to keep it.
-
If you want to look at the lilo configuration file it's /etc/lilo.conf
Running /sbin/lilo puts the changes into effect. Type man lilo for
more information.
-
To bootup the kernel from the redhat startup disk type vmlinuz root=/dev/hd??
In place of the ?? place the drive letter in the first position, and the
drive partition in the second. e.g. vmlinuz root=/dev/hdb1 boots the kernel
residing on the disk using the root /dev/hdb1 The partion that the root
is on must be specified. e.g. root = /dev/hdb won't work.
-
To "compile in" an option means the same as "inside kernel".
-
You might like to backup your old kernel. The kernel is /boot/vmlinuz or
/vmlinuz you might like to copy it to say vmlinuz-old
Also see:
Linux
Kernel HOWTO