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 11-28-2004, 08:47 PM   #1
LQ Newbie
Registered: Nov 2004
Posts: 3

Rep: Reputation: 0
New Kernel-make command not working

I am new to Linux and have Mandrake 8.2 running. I tried to update the kernel. I was able to get the tar file, put it onto the computer and then
untar it. I was also able to use make config to get the config file to come up. I answered all the questions, but was not able to run make dep or make bzImage/zimage. After I completed the config file, the screen had a message "run make dep." But it does not work.

It will give an error /bin/sh command not found. then make:** {scripts/mkdep] Error 127. But the make command will open config and create the file. I have no idea where I went wrong, but neither make dep or make bzimage will work. Does anybody have any ideas of how to fix the problem and continue compiling the Kernel?
Old 11-28-2004, 09:14 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
From what info you've given, it looks like you skipped a step. After the configure step, if I remember correctly, you need to run 'make' to generate the makefiles which direct the rest of the compile operation. Then run 'make dep', 'make bzImage', 'make modules', 'make modules_install'. Then finish the process with '/sbin/depmod'.
Or course, you will have to copy the new compressed kernel to /boot and edit your bootloader config to point to the new kernel image. If your distro uses inirtd, you need a new one of those, also.
In conclusion, it's best if you give the new kernel image a different name than vmlinuz (save the current kernel image and /lib/modules to have something to boot into if something goes wrong) and add a new entry to your bootloader config. That way, you still have a bootable kernel until you are certain the new one works, then delete the old one.
If you don't know how, there's an option in the kernel config process called EXTRAVERSION which allows you to specify a tag to add to the new kernel name, so that a new kernel and /lib/modules don't overwrite the old ones. For kernel recompiles, I find bulldkernel to be the tool to use to ease the process. It doesn't come with most distros; you have to d/l and install. It's worth the effort.
Old 11-29-2004, 09:34 PM   #3
LQ Newbie
Registered: Nov 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the reply. I do not remember running the make command, although I've done
so many things to try and get on stream, I'm not 100% sure. The rest of the steps you mentioned, including Extraversion, I do have notes on.

I keep getting error 127 with make repeatedly and I am going to reformat then try the upgrade again because I have a test unit and I want to make sure that I do every step, including all that you mentioned, correctly and in order. I did some editing of the bootloader and a little pruning of different files here and there because I am a newbie.

I should be reformatting tonight and let you know if the problem still occurs in the next few days. In the meantime, if anyone else can think of anything I left out, feel free to post.

Thanks much for your kind post!!
Old 11-29-2004, 10:19 PM   #4
Registered: Feb 2002
Location: Carson City, Nevada
Distribution: Gentoo / SuSE 9.1 Pro (both A64)
Posts: 159

Rep: Reputation: 30
Before starting over, you need to be in the same directory as the kernel source. Usually /usr/src/linux-2.4.bla-bla And typically there's a symlink called /use/src/linux that actually points to the kernel source directory. From /usr/src type 'ln -s linux-2.4.bla-bla linux. Using the actual directory name of course. Then ls -l should show linux -> linux-2.4.bla-bla. And if you haven't given yourself write access to the directory you need to be su to do all of that.

Do the actual work from /usr/src/linux after making the symlink, there may be something depending on that location. I haven't touched Mandrake in years, so I really can't say.

Hope that helps

Last edited by Psycho; 11-29-2004 at 10:22 PM.
Old 11-29-2004, 11:13 PM   #5
Registered: Sep 2003
Location: Canada
Distribution: Fedora 30
Posts: 341

Rep: Reputation: 37
I want to ask you why do you want to rebuild your kernel? This may be a stupid question; go ahead and flame me. I don't know.

In my mind there are so many work arounds.
So many simpler answers.

Really. Why do you want to?
Old 11-30-2004, 12:01 AM   #6
LQ Newbie
Registered: Nov 2004
Posts: 3

Original Poster
Rep: Reputation: 0
I just redid everything and follow all the steps and the error starts with make dep
from the linux directory
it says -gcc:installation problem, cannot exec cpp0 no such file or directory. Any ideas?

As for kernel compiling, I like to find out about different os, and have a test machine I can
play with. It's just a learning experience; just wanted to find out for myself so I can know
more about how linux works.
Old 11-30-2004, 11:15 PM   #7
Registered: Sep 2003
Location: Canada
Distribution: Fedora 30
Posts: 341

Rep: Reputation: 37
Hey ashley67

Not to discourage you from trying to rebuild your kernel. But just because it is there???
I am new to Linux
My humble advice will suggest is to stick to basics at first.
Install source software. Kewl stuff. Whatever you want.
make install

So you wouldn't consider skipping steps once you know.
Learn dependencies.
Play with scripts.
Play with your kernel.

You also have to understand the different users you can log in as and what permissions you have under each user account. In MHO, this is one of the greatest powers of (Li)Unix. Create a new user account to install local software that will not conflict with other users. Way kewl!

If it ain't broke...

Mebbe check out

Hey, we are all still learning
Have fun!



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
executables and "make" command not working blahboybang Linux - General 5 12-24-2004 07:57 PM
make-kpkg not working, so no kernel includes genixpro Linux - Hardware 3 09-14-2004 06:56 PM
"Make" command not working yuun Linux - Software 2 09-12-2004 12:59 AM
"make" command not working in shell unasriseth Linux - Newbie 6 05-25-2004 09:08 AM
Make command not working? (NEWBIE) Willew Linux - Software 2 10-29-2003 09:29 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:29 PM.

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