Both RHEL 5 and CentOS 5 use yum command, which is an interactive, automated update program which can be used for maintaining systems using rpm. To upgrade server and apply all security patches, pass update Continue reading 'Patch and Update Redhat Enterprise Linux / CentOS 5 server'. Unfortunately, Red Hat only allows to upgrade the kernel using the former option. As opposed to Red Hat, CentOS allows the use of ELRepo, a third-party repository that makes the upgrade to a recent version a kernel. To enable the ELRepo repository on CentOS 7, do. Yum -y update kernel. In this case, yum is the rpm-based package manager for both Red Hat and CentOS, -y, –assumeyes gives yes as an answer to any question which would be asked by running the command, update is for updating the package, and kernel is the package you’re updating! How can I check if a certain patch is already installed in my system? Has a patch already been applied to my Linux kernel? Usually, one uses the patch program to apply patchfiles to the source code before compiling, but for this question. Hi all,i want to know that can anyone tell me how to apply kernal patches on ecc6 sr3 DB oracle OS linux RHEL 5.is it the same process as in SAP on windows plateform?regards Imran Khan.
Active10 months ago
I've been installing kernels from mainline repository - all simple there, just
Sergiy KolodyazhnyySergiy Kolodyazhnyy*.deb
files, one can do simple dpkg -i
on them. But how can one apply the patches 0001-base-packaging.patch
, 0002-debian-changelog.patch
, 0003-configs-based-on-Ubuntu-4.4.0-0.10.patch
manually ?78.8k1111 gold badges169169 silver badges349349 bronze badges
1 Answer
As stated in README at mainline:
These binary packages represent builds of the mainline or stable Linux kernel tree at the commit below:
To obtain the source from which they are built fetch the commit below:
and apply the following patches on top in the order below:
This means that you need to apply those patches only if you are building your kernel from source and not from
*.deb
. In case if you are building it from source, then these are the steps you need to follow:
- Install these packages:
- Get the source code:
- Copy the patches files.
- Change to kernel directory:
- Make any custom changes.
- Apply patches:
- Make:
- Install generated deb:
- Update
GRUB
and reboot:
6,30422 gold badges2222 silver badges4444 bronze badges
Not the answer you're looking for? Browse other questions tagged software-installationkernelpatch or ask your own question.
Active1 year, 7 months ago
I am about to install a patch for wireless drivers named Compat Wireless in order to solve a problem with my WiFi channel (it locks on the not existing -1 channel) on my Ubuntu Linux v12.04 and Kali Linux v1.0.9.
But first I would like to know if this patch is already installed (why installing something I do have?).
I have done some research about, and I can not find a way to know if my patch is already there, nor a generic method to list installed patches. I don't even know if it is possible or not to obtain such info from a running Linux.
Any ideas, please?
Sopalajo de ArrierezSopalajo de Arrierez1,9161111 gold badges3636 silver badges6666 bronze badges
3 Answers
Linux is NOT Windows and thus 'patches' are actually totally re-compiled/re-loaded from the base code after source code modifications and distributed as a package. Thus it is a bit difficult to know if some specific change has been incorporated into a binary without downloading the source and checking for the specific source code change.
Versions do not always help either. For example RedHat backports source code changes to older but supported versions of and application and re-released the package changing only the build number but not the version. So in RedHat, you cannot be totally sure if a change that was made by the developer releasing a new sub-version has not been backported to one of their re-released modules. This type of stuff drives me nuts.
Final though, remember there are multiple distributions of Linux with differing methods of package management, versioning and support.
Summary, to be absolutely sure a source code change has been implemented, you have to go to the source of the specific package for the specific distribution you are using.
mdpcmdpc5,25122 gold badges1919 silver badges3838 bronze badges
If one is comfortable enough with Linux to be applying a patch, as this questioner appears to be, then checking if the patch is already in the default kernel is relatively simple: Just check the source code.
Use the Source, Luke!¹
The following should work for any distribution derived from Debian GNU/Linux, which includes what the questioner asked for, Ubuntu:
That will download the Linux source and patch it to be exactly the same state as the distribution used when they compiled it. In the linux-x.y.z directory are the file(s) mentioned in the patch. Just look at the line numbers and make sure that the lines with minus signs aren't there and the ones with plus signs are. That's it.
More detailed answer
Patches are text files that look like this:
Usually, one uses the
patch
program to apply patchfiles to the source code before compiling, but for this question, it might not be worth the bother. One can quickly just eyeball a patchfile and see the filename and the line numbers at the top and then open a text editor there (in this example, emacs +321 drivers/usb/core/urb.c
). A quick glance is all it takes to know. (Minus signs mark lines that should be deleted and plus signs, added).But, maybe it's a good idea to run patch
On the other hand, if one plans on recompiling Linux, it's not a bad idea to start from the distribution's default kernel. In that case, there's no reason not to try running
patch
. The program is smart enough to recognize if the patch was already applied and ask the operator if maybe they want to reverse it.Example of running patch (previously unpatched)
Here is an example of what it looks like on a patch that was not in the default kernel:
If it succeeds, the distribution's default wasn't patched and needs to be recompiled. Fortunately, the Linux source code is now conveniently right there, with the patch applied.
Example of running patch (previously patched)
And here is what it would look like if the distribution's default kernel had already been patched:
'Reversed or previously applied' means nothing more needs to be done as the default kernel was already patched.
Footnote ¹ Sorry for the bad pun, but don't blame me for it; that was the encouragement I was taught long, long ago by UNIX gurus wise in the ways of the Source. They said that when the Source is with you, you become more powerful than any proprietary vendor could ever imagine.
hackerb9hackerb9
In your specific case, your link is from year 2012 and talks about Ubuntu versions 11.10 and older.
The
compat-wireless-3.0-rc4-1.tar.bz2
mentioned in there does not seem to be downloadable any more; and I think the contents would be essentially the wireless drivers of kernel version 3.0-rc4 adapted for installation to kernels older than that. Your Ubuntu 12.04 has kernel version 3.2 or newer; this package would be a downgrade for you. Kali 1.0.9 was released in 2014 and probably has even newer kernel version.Redhat Patch Download
The channel -1 patch mentioned in your link modifies just 6 lines in
<kernel source root>/net/wireless/chan.c
file and does not change any kernel module firmware versions. As a result, there is no easy way to determine whether the patch is installed or not, other than downloading the kernel source package for your currently-installed kernel and looking at that source code file.But I can go to https://www.kernel.org and browse the code there without downloading it. The oldest long-term supported kernel is 3.2.98 at this time: looking at its
.../net/wireless/chan.c
file, it seems the patch is not there: although the line numbers are about 30 lines off from what the patch has, the structure of the cfg80211_set_freq()
function is still essentially the same, so one could in theory apply that patch to a 'vanilla' 3.2. series kernel. The next long-term kernel is version 3.16.53 at this time: when I look at its
.../net/wireless/chan.c
file, I see it has been totally overhauled: the function cfg80211_set_freq()
that the patch modifies is simply no longer there. There is no way to install that channel -1 patch to this version as-is: you would have to understand the new code, find out if the patch is still applicable or not, and apply the equivalent version of the changes listed in the patch to appropriate new location(s) if necessary.And that was just the 'vanilla' standard kernels. Ubuntu or Kali may have applied further patches onto the standard kernels on their own.
telcoMtelcoMRedhat Kernel Release
26.8k11 gold badge3030 silver badges7272 bronze badges