LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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


Reply
  Search this Thread
Old 03-20-2008, 05:59 AM   #1
ganeshas_123
LQ Newbie
 
Registered: Mar 2008
Location: Bangalore, India
Distribution: Red Hat 9.0
Posts: 6

Rep: Reputation: 0
How to apply a 2.4.21patch onto kernel 2.4.18?


Hi all..i'm new to linux..maybe an experience of a couple of weeks..

i'm trying to apply the dave miller patch "linux-2.4.21-ipsec.patch.bz2", which can be found here.. http://kernel.org/pub/linux/kernel/people/davem/IPSEC/
i used the following procedure:
1. copied the zipped patch to /usr/src/linux
2. changed directory to the same
3. gave the command bzip2 -dc /usr/src/patch-2.4.21.bz2 |patch-p0

i'm getting a reject file n the following message:
Hunk #1 FAILED at 5349
Hunk #2 FAILED at 5622
Hunk #3 FAILED at 5693
Hunk #4 FAILED at 26696

4 out of 4 hunks failed– saving rejects to file patch-2.4.21.rej
patching file b/Documentation/crypto/api-intro.txt
patching file b/Documentation/crypto/descore-readme.txt

Cant find file to patch at input line 2471
Perhaps you used the wrong –p or –strip option

is the command given to patch the file wrong? plz help me in this..again.. i'm a newbie
 
Old 03-20-2008, 09:10 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529Reputation: 3529
Looks alright to me. But why use 2.4.21 when current is 2.4.36.2? Any compelling reason to not use that as basis for patching?
 
Old 03-20-2008, 09:18 AM   #3
aus9
LQ Guru
 
Registered: Oct 2003
Posts: 5,124

Rep: Reputation: Disabled
since you are newbie....do you know that after you patch the kernel....whatever kernel you choose...I prefer the 2.6 series.....that you will need to re-compile the kernel?

have you read the guide for your distro on how to do that?

what is your distro?

2) I prefer a different patch way.

d/load file....rename it ipsec.patch.bz2

bzip2 -d ipsec.patch.bz2

cp that into your /usr/src/linux using root powers

su

patch -p1 < ipsec.patch

see if there are any errors...if none you can start to re-compile
 
Old 03-21-2008, 04:09 AM   #4
ganeshas_123
LQ Newbie
 
Registered: Mar 2008
Location: Bangalore, India
Distribution: Red Hat 9.0
Posts: 6

Original Poster
Rep: Reputation: 0
@unSpawn
yeah its very much required tat 2.4.21 be used..

@aus9
yeah i need to recompile the kernel..but first of all i need to make the patching error free..
distro is red hat 7.3..
i tried ur method too..but getting the same error..but i have a simple question..wat shld i give for "file to patch:"..is tat not the file to be patched?..i.e ipsec.patch?

 
Old 03-21-2008, 06:50 AM   #5
aus9
LQ Guru
 
Registered: Oct 2003
Posts: 5,124

Rep: Reputation: Disabled
Code:
$ cd Download/
$ ls
linux-2.4.21-ipsec.patch.bz2
$ mv linux-2.4.21-ipsec.patch.bz2 ipsec.patch.bz2
$ bzip2 -d ipsec.patch.bz2
$ ls
ipsec.patch
$ su
Password:
[root@gs Download]# cp ipsec.patch /usr/src/linux-2.6.24.2/
this is as far as I can go as I use a 2.6 kernel

pretending we continued

cd /usr/src/linux-2.6.24.2
ls shows various files including my patches... patch-2.6.24.1 and patch-2.6.24.2 and your ipsec.patch

if I had a 2.4.18 kernel it would be better to patch to 2.4.21
then patch to ipsec.

but try ipsec first
patch -p1 < ipsec.patch
 
  


Reply


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
Apply patches to kernel kiranbyk Linux - Kernel 1 02-07-2008 03:28 PM
Apply a kernel patch android6011 Ubuntu 2 12-05-2007 06:57 PM
How to apply kernel patch and customise? subaruwrx Linux - Software 7 12-30-2004 10:40 PM
Kernel Patch will not Apply. mudelf Linux - General 10 10-08-2003 06:22 AM
How To Apply Patch To Kernel WILLIAMATHOMAS Linux - Software 2 02-12-2003 01:57 PM


All times are GMT -5. The time now is 04:08 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