LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 03-15-2008, 02:31 PM   #1
linux_linux
Member
 
Registered: Mar 2008
Posts: 52

Rep: Reputation: 15
how to patch a linux kernel


I am using Lokiwall (firewall ) on centos sytem. The lokiwall needs a patch for the kernel. The details are as below:
my kernel version : 2.6.9-42.0.10.EL
patch version: routes-2.6.9-11.diff (http://www.ssi.bg/~ja/)

I have done the following things:
1. obtained the kernel source : linux-2.6.9.tar and extracted into /usr/src directory
2. obtained the patch : routes-2.6.9-11.diff into /usr/src directory

3. created a link : ln -s linux-2.6.9-11 linux
4. cd linux
5. Applied the pathc
[root@ws110 src]# patch -p1 < routes-2.6.9-11.diff (Got the following error)
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff -ur v2.6.9/linux/include/linux/netfilter_ipv4/ip_nat.h linux/include/linux/netfilter_ipv4/ip_nat.h
|--- v2.6.9/linux/include/linux/netfilter_ipv4/ip_nat.h 2004-10-19 10:00:35.000000000 +0300
|+++ linux/include/linux/netfilter_ipv4/ip_nat.h 2004-10-19 11:41:41.432618064 +0300
--------------------------
File to patch:
6. Also specified the full patch path by the command:
patch -p1 < routes-2.6.9-11.diff

Got the same error report...

May i know where I am going worong??

Thanks,
 
Old 03-15-2008, 03:11 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
not a networking question. moved to Linux - Newbie
 
Old 03-15-2008, 05:37 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,177

Rep: Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946Reputation: 1946
Sounds like you are at the wrong level of the tree - try stepping up a level (to /usr/src/).
Not normally the way you'd want to do it, but that patch seems to expect it. Always useful to try --dryrun first anyway.
 
Old 03-15-2008, 06:01 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
no, sounds like this is spam... don't waste your time. should deleted it instead of moving it out of my control!
 
Old 03-15-2008, 08:54 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Sick of bot posting problems from a different forum verbatim on LQ
in irrelevant boards. Banning the thing and closing the threads.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
instructions on how to patch the linux kernel hughes28105 Ubuntu 3 04-04-2007 12:06 PM
How do i patch 2.4.21-37 kernel with antidote2 security patch suchi Linux - Kernel 4 09-05-2006 02:29 AM
what is a linux kernel patch for? mandana Linux - Newbie 6 08-05-2005 02:56 PM
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 06:33 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM


All times are GMT -5. The time now is 08:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration