If you are using RedHat 7.0, you will also need the kernel compilier version of gcc: kgcc. The kgcc-rpm can be found on the first RedHat 7.0 disc. This will also require you to edit the Makefile to change the following line:
HOSTCC = gcc
Change to
HOSTCC = kgcc
If you have not already done so, please read the Warning: Read This First section of this document. To reiterate; I recommend backing up the following information:
cp /etc/System.map /etc/System.map.oldInstead of using old you may want to append the kernel version number to the end of the above files.
cp /etc/config /etc/config.old
If you downloaded a the sources for a new kernel, you should make sure the /usr/src/linux file is a symlink to the current kernel sources directory, and not the actual directory for your current kernel sources. If /usr/src/linux is the current kernel sources directory, move this directory to a new name:
mv /usr/src/linux /usr/src/2.2-16This renames the kernel sources directory called linux to 2.2-16 which is the kernel version. You do not have to rename the file to the kernel version; you can call it whatever you like. Using the kernel version may make it easier for you to remember what you were doing or, if you have other versions of the kernel sources hanging around, what directory contains what version.
If you are recompiling your current kernel, make sure you back up your old modules directory. For instance, using the 2.2-16 kernel as an example:
mv /lib/modules/2.2.16 /lib/modules/2.2.16.oldThis will insure you can always go back to what you had if there is a problem.
Finally, make a backup copy of your boot loader configuration file. If you are using lilo here is an example:
cp /etc/lilo.conf /etc/lilo.conf.old