LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-03-2003, 12:24 PM   #1
acjt
Member
 
Registered: Dec 2002
Location: Australia
Distribution: Gentoo
Posts: 161

Rep: Reputation: 30
Kernel Compile


Hi,

If I recompile my kernel, is there someway I can keep all my current modules, so that if something goes wrong I can successfully revert back to the old kernel, or do I not need to worry about this?
 
Old 11-03-2003, 12:35 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
When recompiling a new kernel its always best to keep your existing server for these reasons, if the new one doesn't boot, you can use the old one to boot back into your system to diagnose the problem.

Regards.
 
Old 11-03-2003, 12:40 PM   #3
acjt
Member
 
Registered: Dec 2002
Location: Australia
Distribution: Gentoo
Posts: 161

Original Poster
Rep: Reputation: 30
Yes, I will backup the existing kernel, but I'm concerned about the modules. Is there someway of backing these up?
 
Old 11-03-2003, 12:45 PM   #4
frandalla
Member
 
Registered: Oct 2003
Location: Tokyo - Japan
Distribution: Slackware
Posts: 348
Blog Entries: 1

Rep: Reputation: 37
If you change your kernels name (or if it is a new version) you old modules will be there yet.
 
Old 11-03-2003, 12:48 PM   #5
musrum
Member
 
Registered: Oct 2003
Distribution: Slackware
Posts: 112

Rep: Reputation: 15
Rather than back up your modules, there is another way. Immediately after finishing your config, before doing 'make dep' (or 'make bzImage' if you are building 2.6), edit the Makefile in the toplevel of the linux source tree. There are lines that define VERSION, PATCHLEVEL, SUBLEVEL, and EXTRAVERSION. Set EXTRAVERSION to something you like, such as -b2 for build 2 (your second try.).

Then go ahead and build the kernel. For convenience, I name my kernels to match so:

cp arch/i386/boot/bzImage /boot/vmlinuz-2.4.22-b2

You will find that the modules are installed in a directory called /lib/modules/2.5.22-b2, leaving your old modules untouched. When you run the new kernel, 'uname -r' will return '2.4.22-b2'. Now you also know how a kernel finds it's matching modules!
 
Old 11-03-2003, 12:49 PM   #6
acjt
Member
 
Registered: Dec 2002
Location: Australia
Distribution: Gentoo
Posts: 161

Original Poster
Rep: Reputation: 30
OK, I see.
So, if I build a 2.6 kernel, the modules created for it will be stored in a different location to where they currently are (wherever that is!!)
 
  


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
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 02:37 PM
I want to compile 2.6 kernel and keep everything from 2.4 intact (dual kernel system) sina_kish Linux - Software 7 02-02-2005 09:01 AM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:15 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