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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-23-2003, 06:32 AM
|
#1
|
LQ Newbie
Registered: Aug 2003
Posts: 1
Rep:
|
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
|
|
|
09-09-2003, 10:35 AM
|
#2
|
LQ Newbie
Registered: Sep 2003
Posts: 4
Rep:
|
I'm having the exact same problem with Mandrake v9.1. I'm running VMWare version 4.
|
|
|
09-09-2003, 01:52 PM
|
#4
|
LQ Guru
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 07:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|