LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New Kernel-make command not working (https://www.linuxquestions.org/questions/linux-newbie-8/new-kernel-make-command-not-working-260333/)

ashley67 11-28-2004 08:47 PM

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?

bigrigdriver 11-28-2004 09:14 PM

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.

ashley67 11-29-2004 09:34 PM

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!!

Psycho 11-29-2004 10:19 PM

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

alar 11-29-2004 11:13 PM

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?

ashley67 11-30-2004 12:01 AM

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.

alar 11-30-2004 11:15 PM

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


All times are GMT -5. The time now is 06:40 PM.