LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 08-14-2003, 12:05 PM   #1
kanuuker
Member
 
Registered: Aug 2003
Location: Florence, AL (CND by birth)
Distribution: Mandrake 9.1
Posts: 41

Rep: Reputation: 15
Question kernel-changin-virgin


I'm a kernel-changin-virgin and could use some quick help.

I'm using Mandrake 9.1. According to their documentation I should have a linux directory in the src directory - I don't. All I have in the src is rpm/rpms/ then athlon, i386>i686, noarch, and k6. However I did find my kernel in the boot directory. Since I don't have the linux directory in my src, should I unpack my new kernel to the boot directory instead and do the install from there?

Any help is appreciated. Thanks.
 
Old 08-14-2003, 01:07 PM   #2
alaric
LQ Newbie
 
Registered: Aug 2003
Location: Amsterdam
Distribution: debian
Posts: 13

Rep: Reputation: 0
Kernel sources are distributed seperately.
What you found in /boot is probably the binary
kernel that comes with Mandrake.

I am sure that Mandrake also distributes the
sources, but I suggest to go for the tarballs as
distributed by Linus Torvalds. Those extract
to linux-2.6.0-test3 (for example), so you want
to untar them inside /usr/src.

As of kernel 2.5.x/2.6, it is not needed anymore to
have the sources explicitely in /usr/src/linux.
Before, that was needed because the headers of
the kernel needed to be available for compilation of
certain tools and that was done by making a symbolic
link to /usr/src/linux/include.
With the latest kernels (and modutils!) this is all done
with a symlink from /lib/modules. So, you still shouldn't
move the kernel sources after installation!

I am not sure if you want to try 2.6.0-test3 yet, there are
issues. Apart from the non-trivial configuration of a kernel,
and (partially manual) installation (lilo/grub),
you will have to upgrade the modutils and create a
/etc/modprobe.conf file (which was called /etc/modules.conf
before). ( Also the -test3 kernel (not -test2) doesn't work with
NPTL/TLS (new (alpha) generation of threading), but that is not
relevant for Mandrake 9.1 I suppose. It is for RH9 though).

Carlo Wood
 
Old 08-14-2003, 02:22 PM   #3
kanuuker
Member
 
Registered: Aug 2003
Location: Florence, AL (CND by birth)
Distribution: Mandrake 9.1
Posts: 41

Original Poster
Rep: Reputation: 15
Actually, I'm looking to downgrade my kernel from Mandrake's 2.4.21-0.13mdk to the pristine 2.4.21. The reason I'm doing this is that I'm trying to install VMware. It says on VMware's webpage that 9.1 isn't supported but others I've talked to said that if I change my kernal or update my headers it will work. The error message I get from VMware is this:
"The directory of kernel headers (version 2.4.21) does not match your running kernel (version 2.4.21-0.13mdk). Even if the module were to compile successfully, it would not load into the running kernel."

If someone could help me with this, that'd be awesome. Please keep in mind that I'm pretty new on Linux. I can get around in the shell without much problem and things like that but as far as some concepts go, I'm still a little green. For example, I don't really understand what headers are.
 
Old 08-14-2003, 05:52 PM   #4
alaric
LQ Newbie
 
Registered: Aug 2003
Location: Amsterdam
Distribution: debian
Posts: 13

Rep: Reputation: 0
The real "version" of a kernel is just a string
of characters that is compiled into the kernel.

You can retrieve this version (of the *running*
kernel) with

uname -r

and that is exactly how many script do that.

An alternative way is to type:

cat /proc/version

which (also) retrieves the version string directly
from the kernel.

This string is *set* during compilation of the kernel
by (manually) editting the root Makefile
(ie /usr/src/linux/Makefile) and changing the stuff
at the top.

Where is this string/version used?
It is used by that same Makefile file to decide on a
name of the installation image (as put in /boot), when
using 'make install'. But more important, it is used as
directory name when installing the kernel modules
(when running 'make modules_install'). The kernel
modules are installed in:

/lib/modules/<version-string>/

where <version-string> is the one returned
by 'uname -r'.

Another place where the version pops up when compiling
a kernel is in a *generated* header file called 'version.h'
(location: /usr/src/linux/include/linux/version.h) or where
ever you put the sources if not in /usr/src/linux.

The reason that vmware complained is probably because
there was a mismatch between the version returned by
uname -r and the version reported in version.h.

This can happen when the version in version.h was NOT
generated in the same run as the compilation of the running
kernel. That means that the header files (the files in
/usr/src/linux/include/linux) are of a different version then
the running kernel and not of the right type.

This is a mistake of Mandrake - imho this version should
always match.

I think that the headerfiles will do fine though, so you could get
away with editting version.h and just adding the -0.13mdk
postfix yourself. Then you will need to compile the vmware
kernel modules as usual.

Note that it is possible that vmware 'finds' the kernel
headers by looking in /lib/modules/`uname -r`/build/include/linux/
where the 'build' is a symbolic link set during installation.
When this link points to /usr/src/linux (as opposed to
/usr/src/linux-2.4.21-013mdk) or even to /usr/src/linux-2.4.21,
then it is possible that now it points to the WRONG kernel
sources (and headers) indeed, when you installed a different
version of linux in /usr/src/linux later. In that case you need
to fix this symbolic link to point to the correct kernel sources.

Carlo Wood
 
Old 08-14-2003, 06:27 PM   #5
kanuuker
Member
 
Registered: Aug 2003
Location: Florence, AL (CND by birth)
Distribution: Mandrake 9.1
Posts: 41

Original Poster
Rep: Reputation: 15
Thanks for the great info. Just to let you know, I got VMware working. All I had to do was install the 2.4*.13mdk source and redirect vmware to the location. Once I figured out what to do it was rather simple. Thanks again.
 
Old 09-09-2003, 10:42 AM   #6
redixon
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
Quote:
Originally posted by kanuuker
Thanks for the great info. Just to let you know, I got VMware working. All I had to do was install the 2.4*.13mdk source and redirect vmware to the location. Once I figured out what to do it was rather simple. Thanks again.
How did you go about this? I'm having the same problem, and I am a total newbie to the Linux arena.
 
Old 09-09-2003, 03:13 PM   #7
redixon
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
Re: kernel-changin-virgin

Quote:
Originally posted by kanuuker
I'm a kernel-changin-virgin and could use some quick help.

I'm using Mandrake 9.1. According to their documentation I should have a linux directory in the src directory - I don't. All I have in the src is rpm/rpms/ then athlon, i386>i686, noarch, and k6. However I did find my kernel in the boot directory. Since I don't have the linux directory in my src, should I unpack my new kernel to the boot directory instead and do the install from there?

Any help is appreciated. Thanks.
Just upgraded my VMWare 4.0.0 to 4.0.2 build 5592. It seemed to have solved the problem. I just unistalled the previous files, and reinstalled the updated tools.
 
Old 10-14-2003, 12:19 PM   #8
kanuuker
Member
 
Registered: Aug 2003
Location: Florence, AL (CND by birth)
Distribution: Mandrake 9.1
Posts: 41

Original Poster
Rep: Reputation: 15
Quote:
How did you go about this? I'm having the same problem, and I am a total newbie to the Linux arena.
You have to find the source code for the kernel and install it. Then proceed to install vmware as normal but you need to direct it toward the location where your source was installed. Sorry but I don't have the link anymore for the source.
 
  


Reply



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
NOT like a Virgin to SUSE? Premadonna Linux - Newbie 3 07-12-2005 02:05 AM
Not like a Virgin to 9.2? Premadonna SUSE / openSUSE 1 07-11-2005 10:19 AM
not exactly virgin... gnashley Slackware 1 06-04-2005 09:20 AM
Help a virgin kernel compiler kill some errors dguy Slackware 4 05-03-2005 06:21 AM
Help!! Linux Virgin! smptfb1 Linux - Newbie 5 08-12-2003 05:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

All times are GMT -5. The time now is 09:15 PM.

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