LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2005, 03:11 PM   #1
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Rep: Reputation: 47
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?
 
Old 03-06-2005, 03:19 PM   #2
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
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.
 
Old 03-06-2005, 05:15 PM   #3
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
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?
 
Old 03-06-2005, 05:40 PM   #4
DaWallace
Member
 
Registered: Feb 2004
Location: Southern Maine, United States
Distribution: Slackware Ubuntu Debian FreeBSD
Posts: 418

Rep: Reputation: 31
if you have trouble with this you CAN get a new copy of the kernel source tree and not have to patch anything..

you just have to browse through the site instead of using the link on the front page.
 
Old 03-06-2005, 06:34 PM   #5
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
Is patching your current kernel a lot easier and quicker than compiling a new kernel, or is it basically the same procedure?
 
Old 03-06-2005, 07:13 PM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
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.)

then compile& install it.

egag
 
Old 03-06-2005, 07:21 PM   #7
linuxhippy
Senior Member
 
Registered: Sep 2004
Location: Philadelphia, PA
Distribution: Xubuntu, Mythbuntu, Lubuntu, Picuntu, Mint 18.1, Debian Jessie
Posts: 1,207

Original Poster
Rep: Reputation: 47
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.
 
  


Reply



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
Kernel Panic After Restoring Linux rrrssssss Linux - Software 1 04-29-2005 06:38 AM
Kernel Panic After Restoring Linux Partition rrrssssss Mandriva 1 04-21-2005 07:17 AM
Restoring LILO Lai Linux - Newbie 3 05-26-2003 12:35 PM
restoring my mouse.... xconspirisist Linux - Software 2 05-26-2003 11:55 AM
restoring original kernel after failed upgrade Smerk Linux - Software 0 01-15-2003 09:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:39 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
Open Source Consulting | Domain Registration