[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [?] installing the sources




Francisco Cribari said:
> I am a newbie, so I am prone to ask obvious questions. Sorry. I have
> installed Red Hat Linux 5.0 to my system, and all seems to be working
> well now. I would like to compile the kernel. The manual states that
> I need to install the "kernel-headers and kernel-source" before com-
> piling the kernel. How do I do that? I've copied the file
> 
>      kernel-2.0.32-2.src.rpm
> 
> from the 2nd CD to /usr/src/linux and tried to run rpm on it, which
> did not work (I believe). Since I don't have much experience with
> rpm, I am probably doing something wrong. So, I was wondering if
> someone could explain to me (step by step) how to install the kernel
> sources. Thanks a lot in advance. Best, FC.

Well, you can install that source rpm with "rpm -ivh
kernel-2.0.32-2.src.rpm", but that's not what you want to do.  Red Hat
has rpms of the kernel source & headers that install to
/usr/src/linux, which would be a better choice (the .src.rpm will
install the kernel source tar file to /usr/src/redhat/SOURCES/ or
something), but that still isn't the best thing to do.

Here's your best bet...  Get the following file:

    ftp://ftp.kernel.org/pub/linux/kernel/v2.0/linux-2.0.33.tar.gz

(Obviously, replace the above file with whatever the latest stable
kernel is.  'finger @linux.kernel.org' or look for a LATEST-IS-* file
in that directory to find out what the latest version is.)

Anyway, for that kernel, do the following to build it:

    cd /usr/src
    rm linux
    mkdir linux-2.0.33
    ln -s linux-2.0.33 linux
    tar -zxvf linux-2.0.33.tar.gz
    cd linux
    make config # or "make menuconfig" or "make xconfig", if you prefer
    make dep && make clean && make zImage && make modules && \
    make modules_install
    cp -i arch/i386/boot/zImage /boot/vmlinuz-2.0.33
    # Edit /etc/lilo.conf with your favorite editor.  I like vi.
    # Sample lilo.conf follows.
    vi /etc/lilo.conf
    /sbin/lilo # to reinstall lilo

And you're done.  :-)

BTW, here's a sample /etc/lilo.conf.  You'll want yours to look
something like this:

### start here ###
# set this to your boot drive
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
# set this higher if you want to boot another OS
delay=10
timeout=2400
read-only
# set this to your real root filesystem
root=/dev/hda3
image=/boot/vmlinuz-2.0.33
        label=2.0.33
image=/boot/vmlinuz-2.0.32
        label=2.0.32
# If you want to boot Windows 95 or something,
# use an entry like this (uncommented, obviously):
#other=/dev/hda2
#       label=windows
#       table=/dev/hda
### end ###

There.  That should get you started.  :-)

Steve
-- 
steve@silug.org           | Southern Illinois Linux Users Group
(217)698-1694             | Meetings the 1st and 3rd Mondays of every month.
Steven Pritchard          | http://www.silug.org/

--
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.