LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-28-2004, 09:47 PM   #1
ashley67
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, 10:14 PM   #2
bigrigdriver
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, 10:34 PM   #3
ashley67
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, 11:19 PM   #4
Psycho
Member
 
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.

<edit>
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.
</edit>

Hope that helps
--glenn

Last edited by Psycho; 11-29-2004 at 11:22 PM.
 
Old 11-30-2004, 12:13 AM   #5
alar
Member
 
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, 01:01 AM   #6
ashley67
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 12-01-2004, 12:15 AM   #7
alar
Member
 
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???
Quote:
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.
Learn
./configure
make
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 http://www.tldp.org/LDP/intro-linux/html/index.html
or http://linux.rayscomputerservices.com/
or http://www.er.uqam.ca/nobel/r10735/u....html#tth_sEc2

Hey, we are all still learning
Have fun!

alar
 
  


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:47 AM.

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