Next Previous Contents

14. Final Linux Kernel compiling and installation

Time to compile the kernel. You can do it manually via the following commands or use the "built-it" script given below.


        "cd /usr/src/linux"
        "make clean"
        "make dep"
        "make bzImage"

and allow for the kernel to compile (~3mins on a P-II 233)

- Now, compile and install the necessary system modules:


        "cd /usr/src/linux"
        "make modules"
        "make modules_install"

- Once the kernel has compiled, do the following command line (replacing "XYZ" with an identifing name like "2035-masq":

Slackware:


                "cp /usr/src/linux/arch/i386/boot/bzImage /XYZ"

Redhat:


                "cp /usr/src/linux/arch/i386/boot/bzImage /boot/XYZ"

If you would like to automate this process in the future, create this script in /usr/src and run it once you have configured your new kernel.

NOTE: You will want to create the directory /usr/src/config to store your configured kernel setups. This is a good way to find out what is and isn't enabled in a given kernel.

/usr/src/build-it


--
#!/bin/sh
#
# Version: 01/17/00
#
# Part of the copyrighted and trademarked TrinityOS document.
# <url url="http://www.ecst.csuchico.edu/~dranch">
#
# Written and Maintained by David A. Ranch
# dranch@trinnet.net
#
# Updates:
#
# 01/17/00 - Changed the date to use %d over %e and remove any spaces
#            in the date format.
#         
#          - Changed the layout a little and added some beeps at the end
#
cd /usr/src/linux
date > /usr/src/kernel-compile-time.`date +'%b%d'`
#Make sure the /usr/src/config directory exists.
cp /usr/src/linux/.config /usr/src/config/kernel.`date +'%b%d'`
make dep; make clean; make bzImage
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage
cp /usr/src/linux/System.map /boot/System.map.new
make modules; make modules_install
date >> /usr/src/kernel-compile-time.`date +'%b%d'`
echo Compile Done.
echo Rename /boot/bzImage to correct name and edit /etc/lilo.conf,
echo then rename /boot/System.map.new to /boot/System.map, and re-run lilo.
#
# NOTE:  To make these beep work, edit this file under "vi" and type in
#        Control-Q and then Control-G for each ^G shown
#
echo ^G
sleep 1
echo ^G
sleep 1
echo ^G 
--

Don't forget.. "chmod 700 /usr/src/build-it"

To run the script, run it as "./built-it"


Next Previous Contents