SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Rep:
kernel restoring
I have Slackware 10 with kernel 2.4.26. I would like to either patch the kernel I havel or compile kernel 2.4.29. I've never successfully compiled a kernel, so I'm anticipating problems. If I get a kernel panick when I boot, can I restore my working kernel?
Also, I have the 3 patch files (27, 28, 29) to upgrade my kernel to 2.4.29-can I use these to patch my current installed kernel? If so, how?
Depending on how you set up LILO when installing the kernel, you may or may not be able to boot the old kernel.
It's good practice to keep your existing Linux image in LILO, and add a new one for the new kernel. When you're *certain* that the new kernel is working properly, edit your lilo.conf again, and comment out the original kernel.
I keep the install kernel image in my lilo.conf, but commented out, so that when I update the kernel I just have to uncomment those lines and update my symlinks, instead of creating an entirely new image.
To patch the images in sequence, just use "patch -p1 < patchfile". Do each of them in order, and I don't see any problem with that.
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
I downloaded the patches to patch my currently installed kernel. How do I install them? I tried this:
bash-2.05b# bzip2 -dc patch-2.4.27.bz2 | patch -p1
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 -urN linux-2.4.26/CREDITS linux-2.4.27/CREDITS
|--- linux-2.4.26/CREDITS 2004-04-14 06:05:21.000000000 -0700
|+++ linux-2.4.27/CREDITS 2004-08-07 16:26:04.249330136 -0700
--------------------------
File to patch:
So, where is the file? The directory /usr/src/linux exists but is a link to /usr/src/linux-2.4.26 /boot/vmlinuz doesn't work.
I also tried this:
/usr/src/linux/scripts/patch-kernel linux
usage: patch-kernel [-h] [ sourcedir [ patchdir [ stopversion ] [ -acxx ] ] ]
The source directory defaults to /usr/src/linux, and
the patch directory defaults to the current directory.
The patches were in the current directory. Is the script looking for my currently installed kernel? Where is the kernel file?
it's just more work. ( you patch the source, not the kernel you've got, and then you compile again)
the easy way is to download the new full sources, and use your config-file of your " old " kernel.
( just copy that file to " .config " in the /usr/src/linux-2.4.29 dir.)
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207
Original Poster
Rep:
That's what I was starting to think-thanks for the confirmation! Looks like I've got some reading to do on 'How to build the Kernel' before I start this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.