LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
 
LinkBack Search this Thread
Old 08-23-2003, 06:32 AM   #1
ZoNicONE
LQ Newbie
 
Registered: Aug 2003
Posts: 1

Rep: Reputation: 0
VMware module building kernel error ^^


First post whatsoever, so Hi to everyone ^^

Yesterday, I finally installed SuSE 8.2, and I even got the nvidia nforce drivers installed, including output over digital coax, after about 9 hours of work (don't ask me how, I barely remember anything... all those config files... argh...). Thanks to a good tutorial, I even got a script to work that enabled NAT for ppp0 on my PC, and got it into the boot process. Pretty fair for a newbie like me I guess.

Now comes my Problem:
I wanted to use the trial of VMware. When I'm executing the config script, this comes up:
Code:
Trying to find a suitable vmmon module for your running kernel.

None of VMware Workstation's pre-built vmmon modules is suitable for your
running kernel.  Do you want this program to try to build the vmmon module for
your system (you need to have a C compiler installed on your system)? [yes] y

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/usr/src/linux/include]

The directory of kernel headers (version 2.4.20-4GB) does not match your running
kernel (version 2.4.20-4GB-athlon).  Even if the module were to compile
successfully, it would not load into the running kernel.
I've had installed the kernel sources from the SuSE DVD before, but I don't have a clue how to update the kernel sources with the patch that I've downloaded via the Yast online update before, and I've also never recompiled a kernel before.

Would anybody be so kind to give me a step-by-step instruction? I got anything else solved alone so far, but the kernel is far above my knowledge.

Thanx in advance,
ZoNicONE
 
Old 09-09-2003, 10:35 AM   #2
redixon
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
Unhappy

I'm having the exact same problem with Mandrake v9.1. I'm running VMWare version 4.
 
Old 09-09-2003, 10:45 AM   #3
redixon
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
I found a link on this site that might give some help in resolving this issue.

http://www.linuxquestions.org/questi...960#post423960
 
Old 09-09-2003, 01:52 PM   #4
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
While the problem might be easily solved by making soft links pointing to appropriate kernel source directory or by doing some renaming etc. I reckon it's much beneficial in the long run if you learn how to compile and use the kernel yourself. Compiling the kernel, as hard as it may sound to someone with no programming background, is actually very simple, and I don't know jack shit about programming too. In fact 3 weeks ago like you I thought messing around with the kernel is probably a subject beyond my reach for the rest of my life.

If you've installed the kernel sources from your distro usually they''ll be in /usr/src/linux-<version> with a soft link "linux" pointing to it, it should always be pointing at the source of the kernel you're currently using because that's where the compiler will refer to when it needs kernel the source(headers).
Now cd into /usr/src/linux , open up MAKEFILE with add anything you like to EXTRAVERSION=, this will append to your kernel version, so for example if I'm compiling kernel 2.4.22 and specified EXTRAVERSION = -testkernel in the makefile, after I compiled it it'll be referenced as linux-2.4.22-testkernel.

Now to do the configuration quickly just use your current configuration file, which should be where your /boot/config points at. copy it to /usr/src/linux and rename it to say oldconfig.
now do a "make xconfig" in /usr/src/linux, then load configuration from file, enter oldconfig. At this point you can either save and quit or take a look at these kernel options if you prefer, most of the items will have a little help file associated with it. After you've saved and quit do:

make dep && make bzImage && make modules && make modules_install

then wait a while for it to compile, how long it's gonna take depends on your cpu and the number of modules and items you're compiling into the kernel. On my Athlon XP2000 it takes around 15-20 minutes(havent really timed it though) with most common items compiled as loadable modules. If something went wrong during the compilation or you want to start all over again fresh, do a "make mrproper", basically it'll clean up the kernel source to it's original state.

After it's done now all there left to do is installing it, if you use a distro like redhat (probaly also applies for mandrake, not sure about other distros) and are using the kernel source they provide, then you're in luck, just do

make install

it will copy the appropriate files to the appropriate location then update your boot config files (lilo or grub) so you'll see it in the boot menu next time you boot.

otherwise you need to install it yourself, but don't worry that's only 2 minutes extra of simple work.

cp /usr/src/linux/arch/i386/boot/bzImage /boot/vmlinuz-2.4.22-testkernel

That is for makefile example i mentioned before, change the 2.4.22-testkernel part to whatever your one is.
Also in /usr/src/linux , copy System.map and .config file to /boot and rename them to System.map-<version> config-<version> respectively, then change the soft link "System.map" and "config" so that it points to the ones you created instead(you can do this after you successfully booted with the new kernel), this is not essential but it's best to do them.

Now all there left to do is to update the bootloader configuration, depending on whether you're using grub or lilo you need to edit /boot/grub/grub.conf or /etc/lilo.conf.
just copy the entry used for your current kernel, for grub copy the part from the first "title" all the way down to just above the next "title", if there is one, then paste so you have another title entry, then change the kernel to the one you're gonna use. For lilo copy the image=/ part, and dont forget to run "lilo" after you finishing the file.

And that's it, you finished compiling your own kernel!

Last edited by Demonbane; 09-09-2003 at 02:13 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error building nvidia kernel module beeblequix Debian 1 10-07-2005 05:21 PM
Building kernel module from multiple source file in 2.6 kernel yogeshwar_s Programming 1 12-20-2004 09:31 AM
Problems building a simple kernel module for kernel 2.6.7 atticman Linux - Software 2 12-13-2004 03:35 PM
VMware vmmon building error Akuji Slackware 2 02-01-2004 07:58 AM
Building a module within a kernel brianvdc Linux - General 1 12-11-2003 08:13 PM


All times are GMT -5. The time now is 12:16 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration