BACK TO LINUX
This HowTo is an easy way to introduce new users to a quick and effortless kernel compiling. I know that there are other easier and more efficient ways of doing this, but they aren't covered in this guide. I should also mention that this guide is based on compiling a kernel for SuSE Linux, so you may have to research the locations of certain files. Before you compile a new kernel or recompile your old kernel, make sure all important data is backed up as you can render your system inoperable if something goes wrong during the process. You will also need to have root privileges and should make an entry, in /etc/lilo.conf, for your existing kernel to use as a back up incase your new kernel won't load For example, if your kernel is located in /boot/vmlinuz and the label is Linux, first copy vmlinuz and rename it vmlinuz.old (e.g.#cp /boot/vmlinuz /boot/vmlinuz.old). Next edit /etc/lilo.conf and copy the entry for the original but change the image to /boot/vmlinuz.old and change the label to old. After modifying lilo.conf you must run the #lilo command to update the Linux Loader's configuration files. After you reboot and the LILO prompt comes up you can enter either Linux for the new kernel or old for the old kernel.
|#||Precedes the command|
|Bold||The command to be entered|
|>||Precedes the example in the file|
|Italicized||File to be opened|
|Example||Shows either syntax or example|
If you are in Xwindows,
you must use a
terminal or Konsole, all commands can be done at a command line with no GUI,
except for #make xconfig which requires a GUI.
After you have acquired the latest kernel from www.kernel.org or its mirror site, or from a disk.
untar and unzip the new kernel into the /usr/src directory using the command:
#gzip -cd linux-2.4.0-test9.tar.gz | tar xvf -
Run one of the following three to choose options for your kernel:
#make xconfig (for Xwindows GUI setup, must have Xwindows running)
#make menuconfig (for command line prompts)
#make config (for command line text menus)
After you have
chosen all your options, save and exit the menu.
#make bzImage (for large kernels)
(makes loadable modules)
Copy the bzImage
to the boot image location you will use to boot Linux, in this instance the
image is in /boot/vmlinuz, You can verify
the boot image in /etc/lilo.conf.
After logging in
#uname –a (shows kernel version)
BACK TO LINUX