LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-22-2003, 02:21 PM   #1
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 124

Rep: Reputation: 15
Angry Recompiling the kernel


Hey everyone,

I have to admit, that after much trial and error I am ready to rip my hair out over this problem I'm having. I've been successful in recompiling the Linux kernel in the past, but after weeks of trying I just can't seem to get it to work this time around.

I hope that if I describe my process someone out there can maybe point out where I'm going wrong.

Frist, I'm su'ing and going in as root to /usr/src/lin*. I issue the 'make xconfig' command to get the gui configuration tool up. I select the options that I'm wanting. All I'm really doing is adding SMB and NTFS support. I am also de-selecting things that I don't need like SMP support for the proc and SCSI (there is no SCSI on my system).

I then ctrl+alt+backspace to get out of x. I then su back into root and navigate to the /usr/src/lin* directory. I then issue the following string of commands:

make clean; make dep; make bzImage; make modules; make modules_install;

After it's done churning there, I then copy the new image by issuing cp /usr/src/linux-2.4.20-8/arch/i386/boot/bzImage /boot/bzImage.072203

I then point grub to that file to boot from. I am successfull in rebooting from the new kernel but a bunch of things start to fail, including my NIC. One thing I certainly can't do without is the NIC!

Any ideas? Thanks!
-Tim

Last edited by bluethundr; 07-22-2003 at 02:27 PM.
 
Old 07-22-2003, 03:25 PM   #2
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
Hi Tim,
I would do this. This is a list of troubleshooting steps. Try recompiling
and using your kernel after each step until your problem is solved.

1. Just before you do 'make xconfig' type 'make mrproper' then proceed as
always.

2. Go to a real console, not in Xwin. to do everything. Instead of using
"make xconfig" use "make menuconfig" so that you do this:
A. go to real console.
B. type "make mrproper"
C. type "make menuconfig" and configure your kernel features.
D. type "make clean; make dep; make bzImage". Make sure it finishes with no errors.
E. make modules; make modules_install
From here proceed as you normally do. Note steps D and E are 2 seperate steps.

3. In menuconfig only add 1 feature or item to the kernel. then compile and try it. If it works add 1 more item and try that. Keep doing this till it works like you want or breaks.

If you need more help let me know. If 1 of these helps plz reply and tell everyone what worked.

Michael

Last edited by youngstorm; 07-22-2003 at 03:28 PM.
 
Old 07-22-2003, 03:25 PM   #3
Pcghost
Senior Member
 
Registered: Feb 2003
Location: The Real Washington
Distribution: Debian, Android
Posts: 1,819

Rep: Reputation: 46
That copy command should read

cp /usr/src/linux-2.4.20-8/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20-8

I may be wrong but I think that is where the error could be.
 
Old 07-23-2003, 09:56 AM   #4
leonardox
LQ Newbie
 
Registered: Jul 2003
Location: Guadalajara
Distribution: Slackware
Posts: 23

Rep: Reputation: 15
you can see this doc in http://portal.aullox.com/modules.php...ernel+de+Linux
only you have to register.
 
Old 07-24-2003, 10:33 AM   #5
bluethundr
Member
 
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 124

Original Poster
Rep: Reputation: 15
Cool Success!

Hey Michael,

Thanks a bunch for the info! I am happy to report that the approach you suggested worked!

If you don't mind terribly, I have a couple of quick questions I was hoping you could answer. First, what is the purpose of the 'mrproper' makefile target? That was a new one on me, and I was wondering what it's used for/the rationale behind using it.

Also, I was having trouble remembering how to make the 'initrd' file for new kernel I made. Someone once said that it's not necessary, so I decided to forego it. The kernel I am using now is working fine, and I did not make an initrd file for it. Would you happen to know what this file is used for and why it may/may not be needed?

Sorry for taking so long to reply. Many thanks! You sir, are a wizard!

-Tim
 
Old 07-24-2003, 01:09 PM   #6
youngstorm
Member
 
Registered: May 2003
Location: USA
Distribution: Fedora 21, RHEL 5,6&7, Windoze 7
Posts: 235

Rep: Reputation: 31
Hello Tim,
Glad to hear the good news.

First, what was it that worked for you? I ask so that other people who have
the same problem can read this and see how you fixed it.

Second, to answer your questions.
1. make mrproper basicly removes everything (files) created since you untarred
and zipped the kernel source so that it is like new. You want to do this so
that if some file is causing a problem your kernel won't use it. make clean
does this to a point but make mrproper goes much further.
2. initrd. Rather than reinventing the wheel (or documentation in this
case), go to your linux source dir.. Should be something like /usr/src/linux/.
In there you should have a Documentation directory. Go in to it and read
the file called initrd.txt. Also you can go here: http://www.ibiblio.org/pub/Linux/doc...#create_initrd

Hope this answers your questions. If you have more just ask.
Oh, in your linux source directory there is a README file. Read it. It will
give good clear instructions for building and install the kernel.

Thanks for the remark. I am FAR from being a wizard but its still nice to
be called one.

Again, be sure to reply with what worked for you so others can benefit.

Michael

Last edited by youngstorm; 07-24-2003 at 01:13 PM.
 
Old 07-24-2003, 01:47 PM   #7
DrOzz
Senior Member
 
Registered: May 2003
Location: Sydney, Nova Scotia, Canada
Distribution: slackware
Posts: 4,185

Rep: Reputation: 59
click here for my tutorial with a step by step explanation for each command
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
recompiling kernel DaveyB Linux - Newbie 3 08-10-2004 09:45 AM
can i compile just one kernel module whithout recompiling the whole kernel? edman007 Linux - Software 3 02-17-2004 03:05 PM
What does recompiling the kernel do? direwolf20 Linux - Newbie 2 10-08-2003 12:06 AM
What use does recompiling the kernel have? twinkers Debian 8 10-06-2003 10:46 AM
recompiling kernel slacknewbie Linux - General 3 05-08-2002 10:24 AM


All times are GMT -5. The time now is 05:43 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration