Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-22-2003, 03:21 PM   #1
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 144

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!

Last edited by bluethundr; 07-22-2003 at 03:27 PM.
Old 07-22-2003, 04:25 PM   #2
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

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.


Last edited by youngstorm; 07-22-2003 at 04:28 PM.
Old 07-22-2003, 04:25 PM   #3
Senior Member
Registered: Feb 2003
Location: The Arctic
Distribution: Fedora, Debian, OpenSuSE and Android
Posts: 1,820

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, 10:56 AM   #4
LQ Newbie
Registered: Jul 2003
Location: Guadalajara
Distribution: Slackware
Posts: 23

Rep: Reputation: 15
you can see this doc in
only you have to register.
Old 07-24-2003, 11:33 AM   #5
Registered: Jun 2003
Location: Summit, NJ
Distribution: CentOS 5.4
Posts: 144

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!

Old 07-24-2003, 02:09 PM   #6
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:

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.


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

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


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

All times are GMT -5. The time now is 11:00 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration