LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to patch correctly? (https://www.linuxquestions.org/questions/linux-software-2/how-to-patch-correctly-14424/)

ameksa 02-17-2002 08:35 AM

how to patch correctly?
 
have RH 7.1 with kernel 2.4.2-2, after applying patch 2.4.3 have noticed quite a lot of *.orig and *.rej files added in my source tree.
I decided to recompile the patched kernel, but to no avail since it failed to build the kernel correctly and exited with an error message relating to cdrom.c, did not stop however and went further with "make modules" and " make modules_install"
That is after that that my system became almost unusable.

My questions are :
What was wrong in my actions?
How can I restore the system to the initial state without having to format and reinstall from scratch?
Is it possible to download the most recent patch skipping the older ones and apply it without problem?

Thank you for your help

Malicious 02-17-2002 10:23 AM

When you apply patches, the first thing that happens is that the file to be patched is written to a backup file using the original file name with .orig appended. During patching, any patches that are not applied to a file are placed in a <origname>.rej file with an explanation of why the patch was rejected. If all patches succeed, there will be no .rej files and all of the .orig files will be removed.

Your 2.4.3 patches didn't work against the 2.4.2-3 kernel. The most likely reason for this is that the patch set was for 2.4.2 and not 2.4.2-3. The -3 probably means that this kernel has been patched 3 times since 2.4.2.

finegan 02-17-2002 01:48 PM

The reason the system has become unusable probably stems from having made the modules and installed them. You failed to compile the kernel, so you're running on your old stock kernel, but your system is trying to run on the new modules... RH leaves a default of having 'version symboling on the modules', meaning that your modules will only work with a kernel that you never got compiled.

You can re-RPM the whole kernel from the CD, or prefereably: get a pristine copy of the kernel source from kernel.org. The newest is 2.4.17 (In a day or two 2.4.18), and compile and use that instead. If you do, remember to remove the simlink between /usr/src/linux and /usr/src/linux-2.4.2-?. Pristine kernel source will unpack into a dir called linux/ so if that symlink exists it will deposit all of the source over the 2.4.2 source and render the both of them un-compileable. Patching a kernel source tree up a notch is pretty worthless unless the next minor version doesn't exist yet. For instance, taking 2.4.17 to 2.4.17-rc2 is a matter of 9 patches... but in a day or two when 2.4.18 comes out I'm not going to bother with a mountain of patches... I'm just going to skip to snagging the whole new kernel. I just realized this isn't always fasible for people with modems... kernels these days are 30Mb, compressed.

Either way, g'luck

Finegan


All times are GMT -5. The time now is 01:04 AM.