Re: building a new kernel

From: William Stearns (wstearns@pobox.com)
Date: Sat Feb 19 2000 - 09:34:10 EST


Good morning, Troy,

On Fri, 18 Feb 2000, Troy T. Hall wrote:

> I'm trying to upgrade RH 6.1 kernel 2.2.14-20. I need to add Ultra DMA 66

        Keep in mind the "-20" part refers to RedHat's build number,
rather than any official kernel version. You have a choice; either you
can download their rpm's for a given kernel, or you can download the
.tar.gz for that kernel from linux.kernel.org or one of its mirrors. The
latter choice is the only choice if you're trying to build a kernel
they've not yet released, as will be the case for a little while when
2.2.15 first comes out.

> support and support for the Athlon K7-650. I tried to compile the 2.2.14
> kernel and when I rebooted the system it just kept rebooting. Would hardly
> even get started loading linux kernel.

        Did you get any error messages when building the kernel? It's
possible that including the 2.2.12 ramdisk is related to the problem; read
on.

> I looked at lilo and noticed that it is still using some of the old kernel
> stuff. I"ve enclosed both lilo.conf and the directory. I notice that there
> is no system.map for the new kernel. I must be missing some steps. I also

        (Just for reference, once the kernel is built, System.map ends up
in /usr/src/linux.) It looks like you copied it to /boot already; you
might simply want to make a symlink, such as:

cd /boot
ln -sf /System.map-2.2.14 System.map

> need to know the best kernel to use currently.

        2.2.14 is probably a good choice, 2.2.15 should be out "soon".

> Thank you in advance for all ur help
>
> lrwxrwxrwx 1 root root 20 Feb 9 08:54 System.map ->
> System.map-2.2.12-20
> -rw-r--r-- 1 root root 191102 Sep 27 07:45 System.map-2.2.12-20
> -rw-rw-r-- 1 root root 190732 Feb 17 20:32 System.map-2.2.14
> -rw-r--r-- 1 root root 512 Feb 9 08:59 boot.0300
> -rw-r--r-- 1 root root 4568 Sep 22 10:50 boot.b
> -rw-r--r-- 1 root root 612 Sep 22 10:50 chain.b
> -rw-r--r-- 1 root root 285018 Feb 9 08:59 initrd-2.2.12-20.img
> -rw-r--r-- 1 root root 237 Feb 14 20:34 kernel.h
> drwxr-xr-x 2 root root 12288 Feb 9 08:48 lost+found
> -rw------- 1 root root 17920 Feb 14 20:34 map
> lrwxrwxrwx 1 root root 21 Feb 9 08:54 module-info ->
> module-info-2.2.12-20
> -rw-r--r-- 1 root root 11773 Sep 27 07:45 module-info-2.2.12-20
> -rw-r--r-- 1 root root 620 Sep 22 10:50 os2_d.b
> -rwxr-xr-x 1 root root 1544394 Sep 27 07:45 vmlinux-2.2.12-20
> lrwxrwxrwx 1 root root 17 Feb 9 08:54 vmlinuz ->
> vmlinuz-2.2.12-20
> -rw-r--r-- 1 root root 622784 Sep 27 07:45 vmlinuz-2.2.12-20
>
> boot=/dev/hda
> map=/boot/map
> install=/boot/boot.b
> prompt
> timeout=50
> append="mem=256M"

        It might be worth commenting this out at some point as a test to
see if 2.2.14 correctly identifies the amount of memory in your system.

> default=safe
>
> #Normal Linux Boot
>
> image=/boot/vmlinuz-2.2.14
> label=linux
> initrd=/boot/initrd-2.2.12-20.img

         I think this is a poor choice. That ramdisk was created with
modules specific to 2.2.12.
        As long as you're compiling a custom kernel for yourself, you
might as well include all the modules you'll need at boot time (ext2, ide,
and anything else needed to access your root filesystem), and then answer
"y" or "m" to all the other things you'll need. The initrd (so useful in
a distribution's kernel, as they can modularize almost everything and so
provide a single kernel that should work with almost anyone's hardware) is
not needed when you compile your own.

> read-only
> root=/dev/hda9
>
> #Emergency Linux boot ( falls back to original RH 6.1 install )
>
> image=/boot/vmlinuz-2.2.12-20
> label=safe
> initrd=/boot/initrd-2.2.12-20.img
> read-only
> root=/dev/hda9

        The kernel-howto includes more information on the necessary steps
in building a kernel. I've written a program called Buildkernel that
automates the process - see my .sig.
        Cheers,
        - Bill

References:
- The kernel howto at http://www.linuxdoc.org/HOWTO/Kernel-HOWTO.html
- The initrd documentation at /usr/src/linux/Documentation/initrd.txt

---------------------------------------------------------------------------
        I'll carry your books, I'll carry a tune, I'll carry on, carry over,
carry forward, Cary Grant, cash & carry, Carry Me Back To Old Virginia,
I'll even Hara Kari if you show me how, but I will *not* carry a gun.
        -- Hawkeye, M*A*S*H
(Courtesy of Richard Bouska <Richard@Bouska.cz>)
--------------------------------------------------------------------------
William Stearns (wstearns@pobox.com). Mason, Buildkernel, named2hosts,
and ipfwadm2ipchains are at: http://www.pobox.com/~wstearns/
--------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Feb 23 2000 - 21:00:23 EST