Vmware And Kernel


Table of Contents

Install kernel-header for VMware 
Getting the kernel source 
Prepare the kernel 
VMware module build log 
NB, do not use make 
Prepare the Debian kernel-source 
Unpacking kernel sources 
Unpacking kernel sources 
For vmware 

Install kernel-header for VMware 

# kernel version
kv=`uname -r`

Getting the kernel source 

% debfoster kernel-headers-$kv
The following extra packages will be installed:
  kernel-headers-2.4.27-2
The following NEW packages will be installed:
  kernel-headers-2.4.27-2 kernel-headers-2.4.27-2-k7
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 2122kB of archives.
After unpacking 29.9MB of additional disk space will be used.

Prepare the kernel 

cd /usr/src/
 rm linux
ln -s kernel-headers-$kv linux
 dir /boot/config-*
cp -v /boot/config-$kv linux/.config

VMware module build log 

Trying to find a suitable vmmon module for your running kernel.

None of the pre-built vmmon modules for VMware Workstation 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]

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]

# install the kernel header as above

Extracting the sources of the vmmon module.

Building the vmmon module.

Using standalone build system.
make: Entering directory `/vars/tmp/vmware-config0/vmmon-only'
make[1]: Entering directory `/vars/tmp/vmware-config0/vmmon-only'
make[2]: Entering directory `/vars/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-k7'
make[2]: Leaving directory `/vars/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-k7'
make[2]: Entering directory `/vars/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-k7'
make[2]: Leaving directory `/vars/tmp/vmware-config0/vmmon-only/driver-2.4.27-2-k7'
make[1]: Leaving directory `/vars/tmp/vmware-config0/vmmon-only'
make: Leaving directory `/vars/tmp/vmware-config0/vmmon-only'
The module loads perfectly in the running kernel.

NB, do not use make 

cd linux
% make mrproper
make: *** arch/i386/boot: No such file or directory.  Stop.
make: *** [archclean] Error 2
% make dep
make: *** arch/i386/boot: No such file or directory.  Stop.
make: *** [archdep] Error 2
% make oldconfig
rm -f include/asm
( cd include ; ln -sf asm-i386 asm)
/usr/src/linux/include
/bin/sh scripts/Configure -d arch/i386/config.in
#
# Using defaults found in .config
#
scripts/Configure: line 556: arch/i386/config.in: No such file or directory
make: *** [oldconfig] Error 1

documented on: 2005.04.20