SCIENTIFIC-LINUX-USERS Archives

April 2006

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Connie Sieh <[log in to unmask]>
Reply To:
Connie Sieh <[log in to unmask]>
Date:
Thu, 6 Apr 2006 13:45:39 -0500
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (120 lines)
On Thu, 6 Apr 2006, Angel Tsankov wrote:

> ----- Original Message ----- 
> From: "Connie Sieh" <[log in to unmask]>
> To: "Angel Tsankov" <[log in to unmask]>
> Cc: <[log in to unmask]>
> Sent: Thursday, April 06, 2006 5:53 PM
> Subject: Re: SL 4.2: enabling ip forwarding?
> 
> 
> > On Thu, 6 Apr 2006, Angel Tsankov wrote:
> >
> >> > How can I setup an SL 4.2 to write 1 to /proc/sys/net/ipv4/ip_forward instead of 0 at boot time?
> >>
> >> It turns out that I need to apply patch-o-matic to the kernel source and recompile.
> >> Where can I find SL sources?
> >>
> >
> > I do not think you need to do patch-o-matic to do ip_forward.  If you need
> > the kernel sources they are at
> >
> > ftp://ftp.scientificlinux.org/linux/scientific/4.x/SRPMS/vendor/errata/
> 
> In fact, the URL is
> 
> ftp://ftp.scientificlinux.org/linux/scientific/42/SRPMS/vendor/errata/
> 
> I downloaded the kernel sources and I'm going to patch and recompile them to fix the bug with "iptables -t mangle -j TTL" producing 
> "No chain/target/match by that name".

What are you expecting to change?

> 
> I'm curerntly running version 2.6.9-22.0.1.EL of the kernel. May I switch to 
> the most recent version (2.6.9-34.EL)? 

Yes.

> If so, what do I 
> have to do after I recompile the sources? Do I have to reinstall the whole 
> SL or is there any way to replace the kernel only?

You can just install the new kernel.  You can actually have multiple 
kernels installed,  of course only 1 is the default. 

To rebuild the kernel read the notes in 
SL.documentation/RELEASE-NOTES-x86-en
  
The following is from SL.documentation/RELEASE-NOTES-x86-en
----------------------------------------------------------------------------

     o In order to eliminate the redundancy inherent in providing a separate
       package for the kernel source code when that source code already
       exists in the kernel's .src.rpm file, Scientific Linux 4.x no
       longer includes the kernel-source package. Users that require access
       to the kernel sources can find them in the kernel .src.rpm file. To
       create an exploded source tree from this file, perform the following
       steps (note that <version> refers to the version specification for
       your currently-running kernel):

         1. Obtain the kernel-<version>.src.rpm file from one of the
            following sources:

               o The SRPMS directory on the appropriate "SRPMS" CD iso image

               o The FTP site where you got the kernel package

         2. Install kernel-<version>.src.rpm (given the default RPM
            configuration, the files this package contains will be written to
            /usr/src/redhat/)

         3. Change directory to /usr/src/redhat/SPECS/, and issue the
            following command:

            rpmbuild -bp --target=<arch> kernel.spec

            (Where <arch> is the desired target architecture.)

            On a default RPM configuration, the kernel tree will be located
            in /usr/src/redhat/BUILD/.

         4. In resulting tree, the configurations for the specific kernels
            shipped in Scientific Linux 4.x are in the /configs/
            directory. For example, the i686 SMP configuration file is named
            /configs/kernel-<version>-i686-smp.config. Issue the following
            command to place the desired configuration file in the proper
            place for building:

            cp <desired-file> ./.config

         5. Issue the following command:

            make oldconfig

       You can then proceed as usual.


  Note

       An exploded source tree is not required to build kernel modules
       against the currently in-use kernel.

       For example, to build the foo.ko module, create the following file
       (named Makefile) in the directory containing the foo.c file:

 obj-m    := foo.o

 KDIR    := /lib/modules/$(shell uname -r)/build
 PWD    := $(shell pwd)

 default:
     $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules


       Issue the make command to build the foo.ko module.
---------------------------------------------------------------------------

> 
-Connie Sieh

ATOM RSS1 RSS2