On Wed, 10 Mar 1999, Sebasti�n Ferraro wrote:

 # Hi,
 # 
 # I'm trying to install kernel 2.2.2.  I did the following:
 # 
 # 1) Untarred the source tree (actually 2.2.1, but I patched it)
 # 
 # 2) (always from /usr/src/linux):
 # make xconfig
 # make dep clean zImage
 # make zlilo
 # 
 # 3) Rebooted (I don't know if it's necessary)

It is not. And in fact, is probably your problem. The correct steps could
be:

<if untarring fresh>
# cd /usr/src
# mv -f linux linux.old
# tar zvxf /the/path/to/linux-2.2.2.tar.gz
# cd linux

<if doing it all over again>
# cd /usr/src/linux
# make mrproper

<and do these>
# make (config|xconfig|menuconfig)
# make dep
# make (zImage|bzImage)
# make modules
# make (zlilo|install|zdisk)
# make modules_install
# shutdown -r now

The (option|option) are choices. You pick one depending on your needs.

These commands can be combined onto various lines if you wish, but for
clarities sake, I divided them above. It makes little difference.

TMTOWTDI.

You should be careful of combining "make dep" and "make zlilo|zImage"
into a single line because of the flakiness of make's ability to pick up
dependencies. Changes are often made to the Makefile's that result in
unclean builds if you do things in certain steps.

You should also be certain you are using the correct "install" method:
zlilo, install or zdisk. Each does something different. "make install"
looks for a script called /sbin/installkernel to do the actual
installation. A good distribution of Linux would have the correct method
in there, making "make install" a good choice.

I personally use the following /sbin/installkernel:

#!/bin/sh

INSTALL_PATH=/boot
KERNEL_VERSION=$1
BOOTIMAGE=$2
MAPFILE=$3

cp $BOOTIMAGE /boot/`basename $BOOTIMAGE`-$KERNEL_VERSION
cp $MAPFILE /boot/`basename $MAPFILE`-$KERNEL_VERSION


which simply puts the kernel and System.map into /boot with names like:

/boot/bzImage-2.2.3-ac2

Then, I have symlinks to the kernels I want to use, ala:

-rw-r--r--   1 root     root       488237 Mar  5 23:42 bzImage-2.2.2-ac7
-rw-r--r--   1 root     root       469618 Mar 10 22:18 bzImage-2.2.3-ac1
-rw-r--r--   1 root     root       466113 Mar  7 11:52 bzImage-2.2.3-pre2
lrwxrwxrwx   1 root     root           17 Mar 10 22:19 current ->
        bzImage-2.2.3-ac1
lrwxrwxrwx   1 root     root           17 Mar 10 22:19 last ->
        bzImage-2.2.2-ac7
lrwxrwxrwx   1 root     root           17 Mar 10 22:19 test ->
        bzImage-2.2.2-ac7

and a /etc/lilo.conf that looks like:

image = /boot/current
        label   = linux

image = /boot/last
        label   = last

image = /boot/test
        label   = test

So when I want to test out a new kernel, I just make it, "make install"
it, then:

# ln -sf /boot/bzImage-newone /boot/test
# lilo

and choose "test" from the lilo: prompt.

G'day! <trying to bring some sanity>
--                                             n i c h o l a s  j  l e o n
elegance through simplicity*http://mrnick.binary9.net*[EMAIL PROTECTED]
good fortune through truth*roaming:[EMAIL PROTECTED]*ICQ#2170994*U+($++)
TRA#6805*not all questions have answers*pseudogeek:P+++($++)L+($++)W=lm@b9
trust no-one with an iq under 150*understand yourself before trying others

Reply via email to