> Message: 11
> From: Hoyt <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: [Win4Lin-users] VMWare and Win4Lin not playing well together
> Date: Fri, 22 Jun 2001 14:37:27 -0400

<snip>

Hi Hoyt,

> "The directory of kernel headers (version 2.4.3-20mdk) does not match your
> running kernel (version 2.4.3-20mdk-win4lin).  Consequently, even if the
> compilation of the module was successful, the module would not load into
> the running kernel.
>
> What is the location of the directory of C header files that match your
> running kernel? [/usr/src/linux/include] "
>
> And then it won't recognize the headers that are there.
>
> I can boot back and forth from one kernel to the other and make each work
> independently, but isn't avaoiding just that very thing the reason I use
> Win4Lin?

This problem exists whenever you have multiple kernels installed. Some 
programs require that the /usr/src/linux symlink points to the currently 
running kernel source. At the very least, you should have a directory which 
contains the header files for the installed kernel. I don't remember how 
Mandrake handles this when you don't install the kernel source. IIRC, it 
still installs the proper headers.

Netraverse kernels don't include the proper kernel header files. At least the 
ones I can check are like this. Instead, they rely on the headers from the 
original kernel. Obviously they don't match because the version numbers are 
different. Specifically, the EXTRAVERSION value.

Likewise, there is a problem with modules which might be fixed by using the 
'depmod' program on the W4L modules. I can't remember if this needs the 
header files as I always have the kernel source tree available. For an 
average system, the kernel source might not be necessary but at the very 
least, the matching headers should be available. IE, installed in a directory 
which matches the kernel version under the /usr/src directory.

  ex: /usr/src/linux-2.4.3-20.win4lin

There are several ways to fix the problem. Which one you use will depend on 
your current level of Linux expertise. IMHO, it is best to build your own 
kernel. Most distribution kernels contain code which you will probably never 
need as they are compiled to run on the largest variety of systems. This is 
great for getting Linux up and running, which is their main purpose. However, 
they waste resources which could be put to better use.

Here are my suggestion ranked from hard to easy.

1)      Build your own kernel with a new source tree. I prefer sources from 
kernel.org. As far as I can tell, you only loose the 'supermount' ability. I 
usually disable this anyhow (in /etc/fstab.) Of course you could add the 
supermount patch. With kernel.org sources you can update the kernel via 
patches which are much easier to download. Then again, the W4L patch negates 
this capability unless you build a new source tree.

2)      Patch your existing MDK kernel source. This may not as good as #1 (depends 
on your preferences) but at least you have a copy of the source on CD 
already. In either case, make sure you change the value of EXTRAVERSION 
variable in the Makefile. Also, make sure the version matches the directory 
name AND the /usr/src/linux symlink points to the directory.

3)      Duplicate the current MDK headers to a path which matches the W4L kernel 
version. Point the /usr/src/linux symlink to it. 

4) Symlink the Mandrake kernel headers and edit the /usr/src/linux symlink to 
point at the new link. I have not tried this but it should work.

   ln -s /usr/src/linux-2.4.3-20mdk /usr/src/linux-2.4.3-20win4lin
   rm /usr/src/linux
   ln -s /usr/src/linux-2.4.3-20win4lin /usr/src/linux

I always keep the original system, especially in case the new kernel doesn't 
work. If you plan on using the original source you should copy it to a new 
directory. I find it easier to use 'win4lin' appended to the EXTRAVERSION so 
any references to the kernel version tell me that I am running the W4L 
kernel. You can see this on the login consoles and with the 'uname -r' 
program.

Because I use multiple kernels for various purposes I have the system set the 
/usr/src/linux symlink at system boot. If you will only use the W4L kernel as 
the primary kernel, you might be better off by changing the symlink once. To 
keep the system in sync with whatever kernel is booted, I use the rc.local 
script. It only needs a few lines added.

        ver=$(uname -r)
        rm -f /usr/src/linux
        ln -s /usr/src/linux-$ver /usrt/src/linux

BTW, you will find the Midnight Commander shell (console) is very useful for 
making these changes. It allows you to make symlinks as well as edit existing 
ones and, IMHO, it is the best file utility available.

Mike T

_______________________________________________
Win4Lin-users mailing list
[EMAIL PROTECTED]
https://lists.netraverse.com/mailman/listinfo/win4lin-users

Reply via email to