Before you do anything else, make sure you have a way to boot the OS. Make a bootdisk and test it.
Get the source for the kernel and put it in /usr/src.
cd /usr/src
tar -xzf <kernel source file name>
The kernel source lives in /usr/src/linux. Linux is usually a symbolic link to the source tree. ls -l will show this. You can’t get into too much trouble here, but it can get kind of untidy if you don’t do this right. If you are upgrading, copy the .config file from your old Linux source tree to the new one, and type make oldconfig
From X Windows, type make xconfig
From a console, type make config or make menuconfig
Select your options and save the configuration. The configuration is saved in the file .config in /usr/src/linux. You might want to copy this to a floppy or something.
Our sequence from here is:
make dep
make clean
make bzImage
make modules
make modules_install
make bzdisk
This sequence will compile the kernel and modules. For the last command, make sure you have a blank floppy in the drive so you can copy the kernel to it. If you like you can type:
make dep clean bzImage modules modules_install
Copy System.map (/usr/src/linux/System.map) and the kernel (/usr/src/linux/arch/i386/boot/bzImage) to /boot (or wherever your lilo.conf file points to). And make sure your symbolic links are OK. We (as well as most) make a symbolic link:
ln -s vmlinuz-2.4.1 vmlinuz
ln -s System.map-2.4.1 System.map
We then can leave our lilo.conf file pointing at /boot/vmlinuz. It is also wise to copy the image section in lilo.conf and create another label, linuxold for example, and use the previous known good kernel as the image. When you reboot, you can select the old kernel if you have problems with the new one. After you are done editing lilo.conf, run /sbin/lilo. If there are problems with your configuration, links, etc., the output of lilo may clue you in. After you have run lilo, reboot your system and type dmesg | less to check out how your kernel booted.