this tutorial is based off of the offensive-security website.
for a better understanding watch the video up and running backtrack 4,
read the blog post about installing vmware-tools and
read the instructions contained in vmware-tools-patch-backtrack4-7.8.5-2_6_29.tar

we will assume 2 things.
you have just finished installing bt4-prefinal on your virtual machine
and that machine is hosted on VMware-Fusion-2.0.4

from the command line enter the username and password you chose during the installation.

grant yourself superuser powers by typing

sudo su

and set a root password by typing

followed by your new password twice.

fix initrd.gz and splash by typing


when asked if you want to replace initrd.gz answer yes (y)


login as root then start networking and X11

dhclient eth0


once X has loaded

start the vmware-tools installation from the vmware menu.
open a terminal and

mkdir /mnt/cdrom
mount /dev/cdrom3 /mnt/cdrom
cp /mnt/cdrom/VMwareTools-7.9.3-159196.tar.gz /tmp
umount /mnt/cdrom

cancel the vmware tools installation from the virtual machine menu

cd /tmp


tar -xf VMwareTools-7.9.3-159196.tar.gz
tar -xf vmware-tools-patch-backtrack4-7.8.5-2_6_29.tar

now we have to edit some things by hand

cp /tmp/vmware-tools-distrib/lib/modules/source/vmsync.tar /tmp/vmsync.tar
tar -xf vmsync.tar
cd vmsync-only

edit the Makefile and change this line

$(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
to read
$(EXTRA_CFLAGS) -Iinclude2/asm/mach-default -I$(HEADER_DIR)\

save and quit

cd ../
tar -cf vmsync.tar vmsync-only
cp /tmp/vmsync.tar /tmp/vmware-tools-distrib/lib/modules/source/vmsync.tar

edit the file vmwaretools-7.8.5-156735.patch
and remove this hunk

--- vmdesched-OLD/Makefile 2009-03-26 22:37:37.000000000 -0500
+++ vmdesched-only/Makefile 2009-04-08 10:19:50.000000000 -0500
@@ -99,7 +99,7 @@

vm_check_build = $(shell if $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) \
- $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default \
+ $(EXTRA_CFLAGS) -Iinclude2/asm/mach-default -I$(HEADER_DIR) \
-Werror -S -o /dev/null -xc $(1) \
> /dev/null 2>&1; then echo "$(2)"; else echo "$(3)"; fi)

save the file, and run