• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

Applying Patch to the kernel

          i am using Redhat Enterprise 4 AS. and i am trying to install opensource 'snare' auditing tool..  In order for snare to log, the kernel must be integrated with snare. So for the Redhat Enterprse 4, there is no integrared kernel but a patch is available with the extension .diff ( .diff file). Since i am totally new to apply patch to kernel , i dont know what to do with a diff file. I searched and found that patch can be applied with a .patch file using.... patch -p1 < file.patch command being in the kenrel directory. But i dont know what to do with the .diff file. So can anyone of you tell me how to apply the patch with a diff file
  My source kernel resides in   /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9/   which contains the Makefile etc.... and the diff file is /root/snare-0.9.7-

 So please tell me how can apply patch to the kernel using the .diff file.

Thanks and regards
  • 2
1 Solution
RedHat Enterprise Linux has some special twist on the kernel, so you need to make sure the patch you have is
compatible to RHEL AS 4, not for generic 2.6.x kernel. Otherwise, it won't work.
mshajanAuthor Commented:

   Hi wesly,
                    thanks for ur reply, but if i get the right patch for the redhat kernel ( a .diff file) can u tell me how can i apply that .diff patch file...

Thanks and regards
.diff file is same as .patch file in most of case.
After you applied the patch, you need to recompile the kernel.
Check the URL for recompile kernel :
("kernel source code" section)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now